Skip to content

Commit 0c41c0b

Browse files
committed
examples(webgl): stop using old window static methods
These were removed and replaced with normal methods on window and a standalone function to get the global window.
1 parent b36708f commit 0c41c0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/webgl/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use web_sys::{WebGlProgram, WebGlRenderingContext, WebGlShader};
88

99
#[wasm_bindgen]
1010
pub fn draw() {
11-
let document = web_sys::Window::document().unwrap();
11+
let document = web_sys::window().unwrap().document().unwrap();
1212
let canvas = document.get_element_by_id("canvas").unwrap();
1313
let canvas: web_sys::HtmlCanvasElement = canvas
1414
.dyn_into::<web_sys::HtmlCanvasElement>()

0 commit comments

Comments
 (0)