diff options
Diffstat (limited to 'WebInterface/wasm/asm-paint/src/lib.rs')
-rw-r--r-- | WebInterface/wasm/asm-paint/src/lib.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/WebInterface/wasm/asm-paint/src/lib.rs b/WebInterface/wasm/asm-paint/src/lib.rs index 52ddc8f..462a89d 100644 --- a/WebInterface/wasm/asm-paint/src/lib.rs +++ b/WebInterface/wasm/asm-paint/src/lib.rs @@ -12,5 +12,16 @@ extern "C" { #[wasm_bindgen(start)] pub fn entry() { + use web_sys; console_log!("hello {} wasm", 42); + + let window = web_sys::window().unwrap(); + + let document = window.document().unwrap(); + + let body = document.body().unwrap(); + + //body.set_inner_html("<marquee><h1 style='font-size: 100px'>Hello from WASM</h1></marquee>"); + + body.set_inner_html("oho"); } |