mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-03-16 02:00:51 +00:00
Update Window
example in web-sys
This commit is contained in:
parent
7a2f55d2d1
commit
a3e160744e
@ -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");
|
||||
}
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user