DOMTokenList
Generated from idl/dom.webidl when the site was built at 7aa23e2.
DOMTokenList is an interface in idl/dom.webidl, exposed in Window. What it does is on MDN; this page says what niso has of it.
Status
Section titled “Status”The web features its members belong to, each with its Baseline status on the web and how much of the feature’s WPT suite passes in niso (see Web platform support).
| Feature | On the web | In niso | Members |
|---|---|---|---|
| DOM | Widely available | No WPT tests WPT maps no test to it | 9 |
Members
Section titled “Members”length
Section titled “length”readonly attribute unsigned long length;int32_t niso_dom_token_list_get_length(niso_dom* dom, niso_handle self, uint32_t* out);item()
Section titled “item()”getter DOMString? item(unsigned long index);int32_t niso_dom_token_list_item(niso_dom* dom, niso_handle self, uint32_t index, niso_str* out);contains()
Section titled “contains()”boolean contains(DOMString token);int32_t niso_dom_token_list_contains(niso_dom* dom, niso_handle self, const char* token, size_t token_len, bool* out);undefined add(DOMString... tokens);int32_t niso_dom_token_list_add(niso_dom* dom, niso_handle self, const niso_str* tokens, size_t tokens_len);remove()
Section titled “remove()”undefined remove(DOMString... tokens);int32_t niso_dom_token_list_remove(niso_dom* dom, niso_handle self, const niso_str* tokens, size_t tokens_len);toggle()
Section titled “toggle()”boolean toggle(DOMString token, optional boolean force);int32_t niso_dom_token_list_toggle(niso_dom* dom, niso_handle self, const char* token, size_t token_len, bool has_force, bool force, bool* out);replace()
Section titled “replace()”boolean replace(DOMString token, DOMString newToken);int32_t niso_dom_token_list_replace(niso_dom* dom, niso_handle self, const char* token, size_t token_len, const char* new_token, size_t new_token_len, bool* out);stringifier attribute DOMString value;int32_t niso_dom_token_list_get_value(niso_dom* dom, niso_handle self, niso_str* out);int32_t niso_dom_token_list_set_value(niso_dom* dom, niso_handle self, const char* value, size_t value_len);iterable
Section titled “iterable”iterable<DOMString>;Not in niso yet
Section titled “Not in niso yet”Members the web has, by the BCD keys web-features 3.45.0 lists, that idl/ doesn’t declare. The list is partial: web-features lists only the keys it maps to a feature.
@@iterator(DOM)entries(DOM)forEach(DOM)keys(DOM)remove_duplicates(DOM)supports(DOM)toString(DOM)trim_whitespace(DOM)values(DOM)