Skip to content
This repository has been archived by the owner on Sep 8, 2024. It is now read-only.

Commit

Permalink
Fix web_sys API change
Browse files Browse the repository at this point in the history
  • Loading branch information
darthdeus committed Aug 17, 2024
1 parent 56d08b0 commit 59b003b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions comfy/src/game_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@ pub async fn run_comfy_main_async(
match &game_config().wasm_append_id {
Some(id) => {
let dst = doc.get_element_by_id(&id)?;
let canvas = web_sys::Element::from(window.canvas());
let canvas = web_sys::Element::from(window.canvas()?);
dst.append_child(&canvas).ok()?;
}
_ => {
let dst = doc.body()?;
let canvas = web_sys::Element::from(window.canvas());
let canvas = web_sys::Element::from(window.canvas()?);
dst.append_child(&canvas).ok()?;
}
};
Expand Down

0 comments on commit 59b003b

Please sign in to comment.