Try to find an #iced element by default on Wasm

This commit is contained in:
Héctor Ramón Jiménez 2024-03-19 05:41:56 +01:00
parent 8ce16aba62
commit bf93c82fac
No known key found for this signature in database
GPG key ID: 7CC46565708259A7

View file

@ -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")),
}
}
}