on master help sign in
Fix doc tests
commit7fa30a76d749cec1b2c2eb4ec62c794aacc4a887 authorNick Fitzgerald <fitzgen@gmail.com> dateMon 11 Feb 2019, 20:07 (8 years ago) parentbc9beb1
2 files changed+6−3
src/cached.rs+1−1 src/lib.rs+5−2
src/cached.rs+1−1
@@ -88,7 +88,7 @@ impl<R> Cached<R> {
8888 /// where
8989 /// 'a: 'bump,
9090 /// {
91− /// Node::element(bump, "p", [], [
91+ /// Node::element(bump, "p", [], [], [
9292 /// Node::text("Hello, "),
9393 /// Node::text(&self.who),
9494 /// Node::text("!"),
src/lib.rs+5−2
@@ -3,6 +3,9 @@
33//! ## Example
44//!
55//! ```no_run
6+//! use dodrio::{on, bumpalo::Bump, Attribute, Node, Render};
7+//! use wasm_bindgen::UnwrapThrowExt;
8+//!
69//! /// A component that greets someone.
710//! pub struct Hello<'who> {
811//! who: &'who str,
@@ -29,10 +32,10 @@
2932//! [on(bump, "click", |root, _vdom, _event| {
3033//! let hello = root.unwrap_mut::<Hello>();
3134//! let window = web_sys::window().expect_throw("should have a `Window` on the Web");
32−//! window.alert(hello.who);
35+//! window.alert_with_message(hello.who);
3336//! })],
3437//! // Attributes.
35−//! [Attribute { name: "id", value: &id }],
38+//! [Attribute { name: "id", value: id.into_bump_str() }],
3639//! // Child nodes.
3740//! [
3841//! Node::text("Hello, "),