summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-04-13 06:03:44 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-04-13 06:03:44 +0200
commitdb4b899fd215f0607474006a9aef0361e74d481f (patch)
treee5826fbeb0ec06679451e3e9b909deef08f4bbe1
parent9410fb98275fb51f67c55b676d8b37a5197222b3 (diff)
downloadiced-db4b899fd215f0607474006a9aef0361e74d481f.tar.gz
iced-db4b899fd215f0607474006a9aef0361e74d481f.tar.bz2
iced-db4b899fd215f0607474006a9aef0361e74d481f.zip
Fix Wasm target for `integration_wgpu`
Diffstat (limited to '')
-rw-r--r--examples/integration_wgpu/src/main.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/integration_wgpu/src/main.rs b/examples/integration_wgpu/src/main.rs
index 8e0056f3..3ac458b3 100644
--- a/examples/integration_wgpu/src/main.rs
+++ b/examples/integration_wgpu/src/main.rs
@@ -33,7 +33,8 @@ pub fn main() -> Result<(), Box<dyn std::error::Error>> {
web_sys::window()
.and_then(|win| win.document())
.and_then(|doc| doc.get_element_by_id("iced_canvas"))
- .and_then(|element| element.dyn_into::<HtmlCanvasElement>().ok())?
+ .and_then(|element| element.dyn_into::<HtmlCanvasElement>().ok())
+ .expect("Canvas with id `iced_canvas` is missing")
};
#[cfg(not(target_arch = "wasm32"))]
env_logger::init();