From d46f6f92ce1f5f2776ab48f74dbd4439b1f17e9f Mon Sep 17 00:00:00 2001 From: Richard <30560559+derezzedex@users.noreply.github.com> Date: Fri, 13 Sep 2024 19:15:15 -0300 Subject: Fix `wasm32` deployments not displaying anything (#2574) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * reuse `canvas` element generated by dummy window * fix formatting * set `control_flow` to `Poll` in `resumed` this is mostly a fix for Chrome * Avoid blowing up memory when booting up on Wasm --------- Co-authored-by: Héctor Ramón Jiménez --- winit/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'winit/Cargo.toml') diff --git a/winit/Cargo.toml b/winit/Cargo.toml index f5a47952..bd6feb00 100644 --- a/winit/Cargo.toml +++ b/winit/Cargo.toml @@ -44,5 +44,5 @@ winapi.workspace = true [target.'cfg(target_arch = "wasm32")'.dependencies] web-sys.workspace = true -web-sys.features = ["Document", "Window"] +web-sys.features = ["Document", "Window", "HtmlCanvasElement"] wasm-bindgen-futures.workspace = true -- cgit