Files
double-pendulum/src/lib.rs
T
flip db021cb24b
gitea/double-pendulum/pipeline/head This commit looks good
feat: Bouwende wasm content toegevoegd
2026-09-05 17:37:16 +02:00

16 lines
452 B
Rust

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(())
}