mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-05-30 06:01:21 +00:00
Rejigger Travis slightly to take advantage of build stages to build the `gh-pages` branch amongst a set of builders, and then when they're all done we synchronize and deploy the site. For now use S3 as a backing store for data between jobs.
754 B
754 B
web-sys: DOM hello world
View full source code or view the compiled example online
Using web-sys
we're able to interact with all the standard web platform
methods, including those of the DOM! Here we take a look at a simple "Hello,
world!" which manufactures a DOM element in Rust, customizes it, and then
appends it to the page.
Cargo.toml
You can see here how we depend on web-sys
and activate associated features to
enable all the various APIs:
{{#include ../../../examples/dom/Cargo.toml}}
src/lib.rs
{{#include ../../../examples/dom/src/lib.rs}}