diff --git a/Cargo.toml b/Cargo.toml index 9885cd23..8617f5ec 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -113,8 +113,5 @@ optional = true [target.'cfg(target_arch = "wasm32")'.dependencies.std_web] package = "stdweb" -version = "0.4.17" +version = "0.4.18" optional = true - -[patch.crates-io] -stdweb = { git = "https://github.com/koute/stdweb", rev = "b3a29bb9dd9b9405540d711ed02a21cd7058d5c0"} diff --git a/src/lib.rs b/src/lib.rs index 87d7d2a5..68a4040c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -130,7 +130,6 @@ extern crate bitflags; #[macro_use] extern crate objc; #[cfg(feature = "std_web")] -#[macro_use] extern crate std_web as stdweb; pub mod dpi; diff --git a/src/platform_impl/web/stdweb/event.rs b/src/platform_impl/web/stdweb/event.rs index 81397056..f05e1ddb 100644 --- a/src/platform_impl/web/stdweb/event.rs +++ b/src/platform_impl/web/stdweb/event.rs @@ -2,7 +2,7 @@ use crate::dpi::LogicalPosition; use crate::event::{ModifiersState, MouseButton, MouseScrollDelta, ScanCode, VirtualKeyCode}; use stdweb::web::event::{IKeyboardEvent, IMouseEvent, MouseWheelDeltaMode, MouseWheelEvent}; -use stdweb::{unstable::TryInto, JsSerialize}; +use stdweb::{js, unstable::TryInto, JsSerialize}; pub fn mouse_button(event: &impl IMouseEvent) -> MouseButton { match event.button() { diff --git a/src/platform_impl/web/stdweb/mod.rs b/src/platform_impl/web/stdweb/mod.rs index 27998655..87058b70 100644 --- a/src/platform_impl/web/stdweb/mod.rs +++ b/src/platform_impl/web/stdweb/mod.rs @@ -8,6 +8,7 @@ pub use self::timeout::Timeout; use crate::platform::web::WindowExtStdweb; use crate::window::Window; +use stdweb::js; use stdweb::web::html_element::CanvasElement; pub fn throw(msg: &str) {