mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-13 13:01:22 +00:00
Update Window
example in web-sys
This commit is contained in:
@ -46,7 +46,8 @@ use web_sys::Window;
|
|||||||
#[wasm_bindgen]
|
#[wasm_bindgen]
|
||||||
pub fn make_the_window_small() {
|
pub fn make_the_window_small() {
|
||||||
// Resize the window to 500px by 500px.
|
// 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");
|
.expect("could not resize the window");
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
Reference in New Issue
Block a user