Skip to content

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.

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
attribute
readonly attribute unsigned long length;
int32_t niso_dom_token_list_get_length(niso_dom* dom, niso_handle self, uint32_t* out);
operation
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);
operation
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);
operation
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);
operation
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);
operation
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);
operation
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);
attribute
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
iterable<DOMString>;

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)