summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector@hecrj.dev>2024-03-19 23:41:30 +0100
committerLibravatar GitHub <noreply@github.com>2024-03-19 23:41:30 +0100
commitaf6bc4643df83c4695f0954aa3fdd258988a77cf (patch)
treeccf93e4439575a347a8d920325505bc1e215f691 /core
parent8ce16aba6204cb5c02a709cdf79c309f7b7e0196 (diff)
parent06df0b7b08a2448a2a6ee72fa908b1064f1101e8 (diff)
downloadiced-af6bc4643df83c4695f0954aa3fdd258988a77cf.tar.gz
iced-af6bc4643df83c4695f0954aa3fdd258988a77cf.tar.bz2
iced-af6bc4643df83c4695f0954aa3fdd258988a77cf.zip
Merge pull request #2342 from iced-rs/default-wasm-canvas-target
Target `#iced` container by default on Wasm
Diffstat (limited to 'core')
-rw-r--r--core/src/window/settings/wasm.rs12
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")),
+ }
+ }
+}