@@ -23,34 +23,28 @@
2323//! where
2424//! 'a: 'bump,
2525//! {
26+//! use dodrio::builder::*;
27+//!
2628//! let id = bumpalo::format!(in bump, "hello-{}", self.who);
27−//! Node::element(
28−//! bump,
29−//! // The element's tag name. In this case a `<p>` element.
30−//! "p",
31−//! // Listeners.
32−//! [on(bump, "click", |root, _vdom, _event| {
29+//!
30+//! div(bump)
31+//! .attr("id", id.into_bump_str())
32+//! .on("click", |root, _vdom, _event| {
3333//! let hello = root.unwrap_mut::<Hello>();
34−//! let window = web_sys::window().expect_throw("should have a `Window` on the Web");
35−//! window.alert_with_message(hello.who);
36−//! })],
37−//! // Attributes.
38−//! [Attribute { name: "id", value: id.into_bump_str() }],
39−//! // Child nodes.
40−//! [
41−//! Node::text("Hello, "),
42−//! Node::element(
43−//! bump,
44−//! "strong",
45−//! [],
46−//! [],
47−//! [
48−//! Node::text(self.who),
49−//! Node::text("!"),
50−//! ],
51−//! ),
52−//! ],
53−//! )
34+//! web_sys::window()
35+//! .expect_throw("should have a `Window` on the Web")
36+//! .alert_with_message(hello.who);
37+//! })
38+//! .children([
39+//! text("Hello, "),
40+//! strong(bump)
41+//! .children([
42+//! text(self.who),
43+//! text("!"),
44+//! ])
45+//! .finish(),
46+//! ])
47+//! .finish()
5448//! }
5549//! }
5650//! ```