This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
||||
#[wasm_bindgen(start)]
|
||||
fn main() -> Result<(), JsValue> {
|
||||
let window = web_sys::window().expect("No global `window` exists");
|
||||
let document = window.document().expect("No `document` on `window`");
|
||||
let body = document.body().expect("Document should have a body");
|
||||
|
||||
let content = document.create_element("p")?;
|
||||
content.set_inner_html("Hoi vanuit rust!");
|
||||
|
||||
body.append_child(&content)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
Reference in New Issue
Block a user