Skip to content

HTMLFormElement

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

HTMLFormElement 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.

The standard’s HTMLFormControlsCollection and HTMLOptionsCollection are HTMLCollections here, and a form’s indexed and named getters are not supported yet.

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
<form> Widely available Partial 23% 161 of 699 subtests pass 6
constructor
[HTMLConstructor] constructor();
attribute
attribute DOMString name;
int32_t niso_html_form_element_get_name(niso_dom* dom, niso_handle self, niso_str* out);
int32_t niso_html_form_element_set_name(niso_dom* dom, niso_handle self, const char* value, size_t value_len);
attribute
attribute USVString action;
int32_t niso_html_form_element_get_action(niso_dom* dom, niso_handle self, niso_str* out);
int32_t niso_html_form_element_set_action(niso_dom* dom, niso_handle self, const char* value, size_t value_len);
attribute
attribute DOMString method;
int32_t niso_html_form_element_get_method(niso_dom* dom, niso_handle self, niso_str* out);
int32_t niso_html_form_element_set_method(niso_dom* dom, niso_handle self, const char* value, size_t value_len);
attribute
readonly attribute HTMLCollection elements;
int32_t niso_html_form_element_get_elements(niso_dom* dom, niso_handle self, niso_handles* out);
attribute
readonly attribute unsigned long length;
int32_t niso_html_form_element_get_length(niso_dom* dom, niso_handle self, uint32_t* out);

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.

  • acceptCharset (<form>)
  • autocomplete (<form>)
  • checkValidity (Constraint validation API)
  • encoding (<form>)
  • enctype (<form>)
  • formdata event (<form>)
  • noValidate (<form>)
  • rel (<form>)
  • relList (<form>)
  • reportValidity (Constraint validation API)
  • requestSubmit (<form>)
  • reset (<form>)
  • reset event (<form>)
  • submit (<form>)
  • submit event (<form>)
  • target (<form>)