mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-03-16 10:10:52 +00:00
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.
This commit is contained in:
parent
b36708fd85
commit
0c41c0b432
@ -8,7 +8,7 @@ use web_sys::{WebGlProgram, WebGlRenderingContext, WebGlShader};
|
||||
|
||||
#[wasm_bindgen]
|
||||
pub fn draw() {
|
||||
let document = web_sys::Window::document().unwrap();
|
||||
let document = web_sys::window().unwrap().document().unwrap();
|
||||
let canvas = document.get_element_by_id("canvas").unwrap();
|
||||
let canvas: web_sys::HtmlCanvasElement = canvas
|
||||
.dyn_into::<web_sys::HtmlCanvasElement>()
|
||||
|
Loading…
x
Reference in New Issue
Block a user