diff options
author | natrixaeria <janng@gmx.de> | 2019-05-25 02:40:00 +0200 |
---|---|---|
committer | natrixaeria <janng@gmx.de> | 2019-05-25 02:40:00 +0200 |
commit | 04792563e216f57984219e582de491947e2d7f40 (patch) | |
tree | 69dbe9143271352122d90452a1cab8f8d391c77e /WebInterface/wasm/asm-paint/src/lib.rs | |
parent | 90be5f8d63e77ee51256270dec018e2c7448e115 (diff) |
Manipulate DOM
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"); } |