1//! The `dodrio` virtual DOM.
6//! use dodrio::{bumpalo::Bump, Attribute, Node, Render};
7//! use wasm_bindgen::UnwrapThrowExt;
9//! /// A component that greets someone.
10//! pub struct Hello<'who> {
14//! impl<'who> Hello<'who> {
15//! /// Construct a new `Hello` component that greets the given `who`.
16//! pub fn new(who: &str) -> Hello {
21//! impl<'who> Render for Hello<'who> {
22//! fn render<'a, 'bump>(&'a self, bump: &'bump Bump) -> Node<'bump>
26//! use dodrio::builder::*;
28//! let id = bumpalo::format!(in bump, "hello-{}", self.who);
31//! .attr("id", id.into_bump_str())
32//! .on("click", |root, _vdom, _event| {
33//! let hello = root.unwrap_mut::<Hello>();
35//! .expect_throw("should have a `Window` on the Web")
36//! .alert_with_message(hello.who);
51#![deny(missing_docs, missing_debug_implementations)]
53// Re-export the `bumpalo` crate.
59// Only `pub` so that the wasm-bindgen bindings work.
71// Re-export items at the top level.
72pub use self::cached::Cached;
73pub use self::node::{Attribute, ElementNode, Listener, ListenerCallback, Node, TextNode};
74pub use self::render::{Render, RootRender};
75pub use self::vdom::{Vdom, VdomWeak};
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list