From d8d57a800a2e1bd11dc4d69634d630c8e6117c39 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sat, 5 Nov 2022 01:43:28 +0100 Subject: Allow providing a DOM identifier as a `target` for Wasm --- winit/src/settings.rs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'winit/src/settings.rs') diff --git a/winit/src/settings.rs b/winit/src/settings.rs index 6387454b..9bbdef5c 100644 --- a/winit/src/settings.rs +++ b/winit/src/settings.rs @@ -7,7 +7,15 @@ mod platform; #[path = "settings/macos.rs"] mod platform; -#[cfg(not(any(target_os = "windows", target_os = "macos")))] +#[cfg(target_arch = "wasm32")] +#[path = "settings/wasm.rs"] +mod platform; + +#[cfg(not(any( + target_os = "windows", + target_os = "macos", + target_arch = "wasm32" +)))] #[path = "settings/other.rs"] mod platform; @@ -27,7 +35,7 @@ pub struct Settings { /// communicate with it through the windowing system. pub id: Option, - /// The [`Window`] settings + /// The [`Window`] settings. pub window: Window, /// The data needed to initialize an [`Application`]. -- cgit