Skip to content

Commit

Permalink
wasm: Replace deprecated .passive().
Browse files Browse the repository at this point in the history
  • Loading branch information
kpreid committed Sep 5, 2024
1 parent b57d9a3 commit af152d6
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions all-is-cubes-wasm/src/web_session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ impl WebSession {
.canvas()
.owner_document()
.unwrap();
let mut options_passive_true = AddEventListenerOptions::new();
options_passive_true.passive(true);
let options_passive_true = AddEventListenerOptions::new();
options_passive_true.set_passive(true);

self.add_canvas_to_self_event_listener(
"keydown",
Expand Down Expand Up @@ -343,7 +343,11 @@ impl WebSession {
callback(this, inner, event)
})
},
AddEventListenerOptions::new().passive(passive),
&{
let options = AddEventListenerOptions::new();
options.set_passive(passive);
options
},
);
}

Expand Down

0 comments on commit af152d6

Please sign in to comment.