From bf93c82fac4519e5320f9caee8bde2fdc1c6e41a Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Tue, 19 Mar 2024 05:41:56 +0100 Subject: Try to find an `#iced` element by default on Wasm --- core/src/window/settings/wasm.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'core/src') 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, } + +impl Default for PlatformSpecific { + fn default() -> Self { + Self { + target: Some(String::from("iced")), + } + } +} -- cgit