Update Window example in web-sys

This commit is contained in:
Alex Crichton 2018-09-26 08:14:14 -07:00
parent 7a2f55d2d1
commit a3e160744e

View File

@ -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");
}
```