Skip to content

Fix some deprecation warnings #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion async_ui_web/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 5 additions & 3 deletions async_ui_web/src/lists/virtualized_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
2 changes: 1 addition & 1 deletion async_ui_web_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }

Expand Down
2 changes: 1 addition & 1 deletion async_ui_web_html/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down
4 changes: 2 additions & 2 deletions async_ui_web_html/src/event_handling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ impl<E: JsCast> EventFutureStream<E> {
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()`.
Expand All @@ -70,7 +70,7 @@ impl<E: JsCast> EventFutureStream<E> {
pub fn set_passive(&mut self, passive: bool) {
self.options
.get_or_insert_with(AddEventListenerOptions::new)
.passive(passive);
.set_passive(passive);
}
}

Expand Down
2 changes: 1 addition & 1 deletion examples/big-list/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion examples/guide-project/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]}
2 changes: 1 addition & 1 deletion examples/login-flow/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down
2 changes: 1 addition & 1 deletion examples/web-simple-examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down
2 changes: 1 addition & 1 deletion examples/web-todomvc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion examples/x-bow-playground/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down