From 3521754f814a1b8d5ba8a15a8caab31e6dd25c31 Mon Sep 17 00:00:00 2001 From: Kevin Reid Date: Wed, 4 Sep 2024 16:40:33 -0700 Subject: [PATCH] wasm: Replace deprecated `.passive()`. --- all-is-cubes-wasm/src/web_session.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/all-is-cubes-wasm/src/web_session.rs b/all-is-cubes-wasm/src/web_session.rs index e44b21424..a04ab8a6b 100644 --- a/all-is-cubes-wasm/src/web_session.rs +++ b/all-is-cubes-wasm/src/web_session.rs @@ -114,8 +114,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", @@ -342,7 +342,11 @@ impl WebSession { callback(this, inner, event) }) }, - AddEventListenerOptions::new().passive(passive), + &{ + let options = AddEventListenerOptions::new(); + options.set_passive(passive); + options + }, ); }