Skip to content

Commit

Permalink
Update lib.rs (#2480)
Browse files Browse the repository at this point in the history
Updates call to .set_text_content, now take an Option<&str> instead of &str.
  • Loading branch information
drhodes authored Mar 4, 2021
1 parent 7f99f03 commit 1ca80e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/dom/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pub fn run() -> Result<(), JsValue> {

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

body.append_child(&val)?;

Expand Down

0 comments on commit 1ca80e3

Please sign in to comment.