diff --git a/async_ui_web/Cargo.toml b/async_ui_web/Cargo.toml index c6ce578..35a3023 100644 --- a/async_ui_web/Cargo.toml +++ b/async_ui_web/Cargo.toml @@ -25,7 +25,7 @@ futures-lite = "1.13.0" scopeguard = "1.1.0" js-sys = "0.3.64" -wasm-bindgen = "0.2.87" +wasm-bindgen = "=0.2.100" [dependencies.web-sys] version = "0.3.64" diff --git a/async_ui_web/src/lists/virtualized_list.rs b/async_ui_web/src/lists/virtualized_list.rs index 507a6f1..26940a2 100644 --- a/async_ui_web/src/lists/virtualized_list.rs +++ b/async_ui_web/src/lists/virtualized_list.rs @@ -235,11 +235,13 @@ struct Observer { impl Observer { fn new(root: &Element, spacers: &[&HtmlElement], wake: &js_sys::Function) -> Self { + let options = IntersectionObserverInit::new(); + options.set_root(Some(root)); + options.set_root_margin("100%"); + let observer = IntersectionObserver::new_with_options( wake, - IntersectionObserverInit::new() - .root(Some(root)) - .root_margin("100%"), + &options ) .unwrap_throw(); spacers.iter().for_each(|sp| observer.observe(sp)); diff --git a/async_ui_web_core/Cargo.toml b/async_ui_web_core/Cargo.toml index 9ba1ed9..78de356 100644 --- a/async_ui_web_core/Cargo.toml +++ b/async_ui_web_core/Cargo.toml @@ -13,7 +13,7 @@ scoped-tls-hkt = "0.1.2" smallvec = { version = "1", features = ["union", "const_generics"] } bitvec = { version = "1.0.1", default-features = false, features = ["alloc"] } -wasm-bindgen = "0.2.87" +wasm-bindgen = "=0.2.100" js-sys = "0.3.64" parking_lot = { version = "0.11", features = ["wasm-bindgen"] } diff --git a/async_ui_web_html/Cargo.toml b/async_ui_web_html/Cargo.toml index fcc4f6b..33c8098 100644 --- a/async_ui_web_html/Cargo.toml +++ b/async_ui_web_html/Cargo.toml @@ -10,7 +10,7 @@ repository = "https://github.com/wishawa/async_ui" async_ui_web_core = { version = "0.2.1", path = "../async_ui_web_core/" } async_ui_internal_utils = { version = "0.0.2", path = "../async_ui_internal_utils/" } -wasm-bindgen = "0.2.87" +wasm-bindgen = "=0.2.100" js-sys = "0.3.64" smallvec = { version = "1", features = ["union", "const_generics"] } diff --git a/async_ui_web_html/src/event_handling.rs b/async_ui_web_html/src/event_handling.rs index 28c1275..5d6ad4f 100644 --- a/async_ui_web_html/src/event_handling.rs +++ b/async_ui_web_html/src/event_handling.rs @@ -55,7 +55,7 @@ impl EventFutureStream { pub fn set_capture(&mut self, capture: bool) { self.options .get_or_insert_with(AddEventListenerOptions::new) - .capture(capture); + .set_capture(capture); } /// The `passive` option indicates that the function specified by listener /// will never call `preventDefault()`. @@ -70,7 +70,7 @@ impl EventFutureStream { pub fn set_passive(&mut self, passive: bool) { self.options .get_or_insert_with(AddEventListenerOptions::new) - .passive(passive); + .set_passive(passive); } } diff --git a/examples/big-list/Cargo.toml b/examples/big-list/Cargo.toml index cc0932c..e63abab 100644 --- a/examples/big-list/Cargo.toml +++ b/examples/big-list/Cargo.toml @@ -10,7 +10,7 @@ crate-type = ["cdylib"] [dependencies] async_ui_web = { path = "../../async_ui_web/" } -wasm-bindgen = "0.2.82" +wasm-bindgen = "=0.2.100" futures-lite = "1.13.0" console_error_panic_hook = "0.1.6" diff --git a/examples/guide-project/Cargo.toml b/examples/guide-project/Cargo.toml index 3ef07d8..61f0aca 100644 --- a/examples/guide-project/Cargo.toml +++ b/examples/guide-project/Cargo.toml @@ -9,7 +9,7 @@ crate-type = ["cdylib"] [dependencies] async_ui_web = { path = "../../async_ui_web/" } -wasm-bindgen = "0.2.87" +wasm-bindgen = "=0.2.100" futures-lite = "1.13.0" gloo-timers = { version = "0.2.6", features = ["futures"]} \ No newline at end of file diff --git a/examples/login-flow/Cargo.toml b/examples/login-flow/Cargo.toml index c0ac916..fbdc096 100644 --- a/examples/login-flow/Cargo.toml +++ b/examples/login-flow/Cargo.toml @@ -10,7 +10,7 @@ crate-type = ["cdylib"] [dependencies] async_ui_web = { path = "../../async_ui_web/" } -wasm-bindgen = "0.2.87" +wasm-bindgen = "=0.2.100" futures-lite = "1.13.0" console_error_panic_hook = "0.1.6" gloo-timers = { version = "0.2", features = ["futures"] } diff --git a/examples/web-simple-examples/Cargo.toml b/examples/web-simple-examples/Cargo.toml index 7b37423..5e409e4 100644 --- a/examples/web-simple-examples/Cargo.toml +++ b/examples/web-simple-examples/Cargo.toml @@ -10,7 +10,7 @@ crate-type = ["cdylib"] [dependencies] async_ui_web = { path = "../../async_ui_web/" } -wasm-bindgen = "0.2.82" +wasm-bindgen = "=0.2.100" console_error_panic_hook = "0.1.6" gloo-timers = { version = "0.2.6", features = ["futures"] } diff --git a/examples/web-todomvc/Cargo.toml b/examples/web-todomvc/Cargo.toml index b6afb2e..8815323 100644 --- a/examples/web-todomvc/Cargo.toml +++ b/examples/web-todomvc/Cargo.toml @@ -10,5 +10,5 @@ crate-type = ["cdylib"] [dependencies] async_ui_web = { path = "../../async_ui_web/" } -wasm-bindgen = "0.2.82" +wasm-bindgen = "=0.2.100" futures-lite = "1.13.0" diff --git a/examples/x-bow-playground/Cargo.toml b/examples/x-bow-playground/Cargo.toml index be73bc8..c08712e 100644 --- a/examples/x-bow-playground/Cargo.toml +++ b/examples/x-bow-playground/Cargo.toml @@ -11,7 +11,7 @@ crate-type = ["cdylib"] async_ui_web = { path = "../../async_ui_web/" } x-bow = { path = "../../x-bow/" } -wasm-bindgen = "0.2.82" +wasm-bindgen = "=0.2.100" console_error_panic_hook = "0.1.6" futures-lite = "1.13.0"