-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2342 from iced-rs/default-wasm-canvas-target
Target `#iced` container by default on Wasm
- Loading branch information
Showing
2 changed files
with
12 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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")), | ||
} | ||
} | ||
} |