diff --git a/guide/src/web-sys/using-web-sys.md b/guide/src/web-sys/using-web-sys.md index b270d7ab..9c488cff 100644 --- a/guide/src/web-sys/using-web-sys.md +++ b/guide/src/web-sys/using-web-sys.md @@ -46,7 +46,8 @@ use web_sys::Window; #[wasm_bindgen] pub fn make_the_window_small() { // Resize the window to 500px by 500px. - Window::resize_to(500, 500) + let window = web_sys::window().unwrap(); + window.resize_to(500, 500) .expect("could not resize the window"); } ```