diff options
author | natrixaeria <janng@gmx.de> | 2019-05-25 22:44:04 +0200 |
---|---|---|
committer | natrixaeria <janng@gmx.de> | 2019-05-25 22:44:04 +0200 |
commit | d727f6e769ae6f3210a57f32f6c198469efaa9b8 (patch) | |
tree | 1bbac52753a1efbcd49f8a59133b50f10706d911 /WebInterface/wasm/asm-paint/src | |
parent | 04792563e216f57984219e582de491947e2d7f40 (diff) |
Run with lighttpd and remove deploy.py
Diffstat (limited to 'WebInterface/wasm/asm-paint/src')
-rw-r--r-- | WebInterface/wasm/asm-paint/src/lib.rs | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/WebInterface/wasm/asm-paint/src/lib.rs b/WebInterface/wasm/asm-paint/src/lib.rs index 462a89d..b6a5840 100644 --- a/WebInterface/wasm/asm-paint/src/lib.rs +++ b/WebInterface/wasm/asm-paint/src/lib.rs @@ -8,20 +8,14 @@ macro_rules! console_log { extern "C" { #[wasm_bindgen(js_namespace = console)] fn log(s: &str); + + #[wasm_bindgen(js_namespace = document)] + fn write(s: &str); } #[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>"); + console_log!("hello {} wasm", 44); - body.set_inner_html("oho"); + write("gooo"); } |