https://github.com/xmas7/rust-webplatform
A Rust library for use with emscripten to access the DOM.
https://github.com/xmas7/rust-webplatform
dom emscript library platform rust web
Last synced: about 2 months ago
JSON representation
A Rust library for use with emscripten to access the DOM.
- Host: GitHub
- URL: https://github.com/xmas7/rust-webplatform
- Owner: xmas7
- Created: 2022-09-06T00:07:48.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-09-06T00:09:26.000Z (over 2 years ago)
- Last Synced: 2025-02-01T09:27:54.670Z (4 months ago)
- Topics: dom, emscript, library, platform, rust, web
- Language: JavaScript
- Homepage:
- Size: 505 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rust-webplatform
A Rust library for use with emscripten to access the DOM.
[Read the documentation](http://docs.rs/webplatform), read [brson's post on how
Rust works with emscripten](https://users.rust-lang.org/t/compiling-to-the-web-with-rust-and-emscripten/7627),
or see an example app with [rust-todomvc](http://github.com/tcr/rust-todomvc).```rust
extern crate webplatform;use webplatform::HtmlNode;
let body = HtmlNode::query("body").unwrap();
body.html_set("HELLO FROM RUST
CLICK ME");
let mut button = HtmlNode::query("button").unwrap();
button.on("click", || alert("WITNESS ME"));
```Used with `cargo build --target=asmjs-unknown-emscripten`.
## License
MIT or Apache-2.0, at your option.