Fix wasm32 deployments not displaying anything (#2574)

* 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 <hector@hecrj.dev>
This commit is contained in:
Richard 2024-09-13 19:15:15 -03:00 committed by GitHub
parent f3b51e40f0
commit d46f6f92ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 42 additions and 27 deletions

View file

@ -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