You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I find myself having to manually coerce an Element into the correct type, for example:
let document = web_sys::window().unwrap().document().unwrap();
let val = document.create_element("p").unwrap();
val.set_inner_html("Hello from Rust, WebAssembly, WebPack, and web-sys!");
AsRef::<Node>::as_ref(&document.body().unwrap()).append_child(AsRef::<Node>::as_ref(&val));
The text was updated successfully, but these errors were encountered:
Take the definition of
append_child
for example.I find myself having to manually coerce an
Element
into the correct type, for example:The text was updated successfully, but these errors were encountered: