Skip to content

Commit 1ca80e3

Browse files
authored
Update lib.rs (#2480)
Updates call to .set_text_content, now take an Option<&str> instead of &str.
1 parent 7f99f03 commit 1ca80e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/dom/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub fn run() -> Result<(), JsValue> {
1111

1212
// Manufacture the element we're gonna append
1313
let val = document.create_element("p")?;
14-
val.set_text_content("Hello from Rust!");
14+
val.set_text_content(Some("Hello from Rust!"));
1515

1616
body.append_child(&val)?;
1717

0 commit comments

Comments
 (0)