Skip to content

HTMLSelectElement

Generated from idl/html.webidl when the site was built at 7aa23e2.

HTMLSelectElement is an interface in idl/html.webidl, inheriting HTMLElement, exposed in Window. What it does is on MDN; this page says what niso has of it.

add’s before argument can only be an element, not an index.

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
<select> Widely available Partial 66% 291 of 438 subtests pass 8
constructor
[HTMLConstructor] constructor();
attribute
readonly attribute HTMLFormElement? form;
int32_t niso_html_select_element_get_form(niso_dom* dom, niso_handle self, niso_handle* out);
attribute
attribute boolean multiple;
int32_t niso_html_select_element_get_multiple(niso_dom* dom, niso_handle self, bool* out);
int32_t niso_html_select_element_set_multiple(niso_dom* dom, niso_handle self, bool value);
attribute
readonly attribute HTMLCollection options;
int32_t niso_html_select_element_get_options(niso_dom* dom, niso_handle self, niso_handles* out);
attribute
readonly attribute unsigned long length;
int32_t niso_html_select_element_get_length(niso_dom* dom, niso_handle self, uint32_t* out);
operation
undefined add(HTMLElement element, optional HTMLElement? before = null);
int32_t niso_html_select_element_add(niso_dom* dom, niso_handle self, niso_handle element, niso_handle before);
attribute
attribute long selectedIndex;
int32_t niso_html_select_element_get_selected_index(niso_dom* dom, niso_handle self, int32_t* out);
int32_t niso_html_select_element_set_selected_index(niso_dom* dom, niso_handle self, int32_t value);
attribute
attribute DOMString value;
int32_t niso_html_select_element_get_value(niso_dom* dom, niso_handle self, niso_str* out);
int32_t niso_html_select_element_set_value(niso_dom* dom, niso_handle self, const char* value, size_t value_len);

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.

  • autocomplete (<select>)
  • checkValidity (Constraint validation API)
  • disabled (<select>)
  • item (<select>)
  • labels (<select>)
  • name (<select>)
  • namedItem (<select>)
  • remove (<select>)
  • reportValidity (Constraint validation API)
  • required (<select>)
  • selectedOptions (<select>)
  • setCustomValidity (Constraint validation API)
  • showPicker (showPicker() for <select>)
  • size (<select>)
  • type (<select>)
  • validationMessage (Constraint validation API)
  • validity (Constraint validation API)
  • willValidate (Constraint validation API)