summaryrefslogtreecommitdiffstats
path: root/winit/src/settings
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-11-05 01:43:28 +0100
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-11-05 01:43:28 +0100
commitd8d57a800a2e1bd11dc4d69634d630c8e6117c39 (patch)
tree8a0c6c4eda5ffd349d65c9b0d4273982a21c79c4 /winit/src/settings
parentab2872fe2be5b694f65125b86e5c03b1f3506ac3 (diff)
downloadiced-d8d57a800a2e1bd11dc4d69634d630c8e6117c39.tar.gz
iced-d8d57a800a2e1bd11dc4d69634d630c8e6117c39.tar.bz2
iced-d8d57a800a2e1bd11dc4d69634d630c8e6117c39.zip
Allow providing a DOM identifier as a `target` for Wasm
Diffstat (limited to 'winit/src/settings')
-rw-r--r--winit/src/settings/macos.rs1
-rw-r--r--winit/src/settings/wasm.rs11
-rw-r--r--winit/src/settings/windows.rs1
3 files changed, 11 insertions, 2 deletions
diff --git a/winit/src/settings/macos.rs b/winit/src/settings/macos.rs
index ad4c8cae..f86e63ad 100644
--- a/winit/src/settings/macos.rs
+++ b/winit/src/settings/macos.rs
@@ -1,4 +1,3 @@
-#![cfg(target_os = "macos")]
//! Platform specific settings for macOS.
/// The platform specific window settings of an application.
diff --git a/winit/src/settings/wasm.rs b/winit/src/settings/wasm.rs
new file mode 100644
index 00000000..8e0f1bbc
--- /dev/null
+++ b/winit/src/settings/wasm.rs
@@ -0,0 +1,11 @@
+//! Platform specific settings for WebAssembly.
+
+/// The platform specific window settings of an application.
+#[derive(Debug, Clone, PartialEq, Eq, Default)]
+pub struct PlatformSpecific {
+ /// The identifier of a DOM element that will be replaced with the
+ /// application.
+ ///
+ /// If set to `None`, the application will be appended to the HTML body.
+ pub target: Option<String>,
+}
diff --git a/winit/src/settings/windows.rs b/winit/src/settings/windows.rs
index 9bef1eaf..ff03a9c5 100644
--- a/winit/src/settings/windows.rs
+++ b/winit/src/settings/windows.rs
@@ -1,4 +1,3 @@
-#![cfg(target_os = "windows")]
//! Platform specific settings for Windows.
/// The platform specific window settings of an application.