diff options
author | 2024-03-19 05:41:56 +0100 | |
---|---|---|
committer | 2024-03-19 07:14:02 +0100 | |
commit | bf93c82fac4519e5320f9caee8bde2fdc1c6e41a (patch) | |
tree | 747585dd45dbd47afbf18ab25c3c3b34aa57536b /core | |
parent | 8ce16aba6204cb5c02a709cdf79c309f7b7e0196 (diff) | |
download | iced-bf93c82fac4519e5320f9caee8bde2fdc1c6e41a.tar.gz iced-bf93c82fac4519e5320f9caee8bde2fdc1c6e41a.tar.bz2 iced-bf93c82fac4519e5320f9caee8bde2fdc1c6e41a.zip |
Try to find an `#iced` element by default on Wasm
Diffstat (limited to 'core')
-rw-r--r-- | core/src/window/settings/wasm.rs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/core/src/window/settings/wasm.rs b/core/src/window/settings/wasm.rs index 8e0f1bbc..30e60b6a 100644 --- a/core/src/window/settings/wasm.rs +++ b/core/src/window/settings/wasm.rs @@ -1,11 +1,21 @@ //! Platform specific settings for WebAssembly. /// The platform specific window settings of an application. -#[derive(Debug, Clone, PartialEq, Eq, Default)] +#[derive(Debug, Clone, PartialEq, Eq)] 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. + /// + /// By default, it is set to `"iced"`. pub target: Option<String>, } + +impl Default for PlatformSpecific { + fn default() -> Self { + Self { + target: Some(String::from("iced")), + } + } +} |