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
The first one does not take any argument, whereas the second one expect one index.
As a workaround, I used this code that works:
document
.get_element_by_id("taxonomy-application-choice").expect("Unable to get taxonomy-application-choice").dyn_ref::<Element>().unwrap().set_inner_html("");
The text was updated successfully, but these errors were encountered:
alexcrichton
added a commit
to alexcrichton/wasm-bindgen
that referenced
this issue
Dec 14, 2018
I'm not a Javascript expert, so I do not really know the idiom to empty a
select
tag and this issue may be a nonsense.Naively I have used this code by following
web_sys
documentation:But it did not emptied at all my
select
. Is is a correct behavior ?Digging deeper in the documentations, I have noticed an inconsistency between web_sys signature of HtmlSelectElement::remove
https://rustwasm.github.io/wasm-bindgen/api/web_sys/struct.HtmlSelectElement.html#method.remove
and javascript one
https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement/remove
The first one does not take any argument, whereas the second one expect one index.
As a workaround, I used this code that works:
The text was updated successfully, but these errors were encountered: