HTMLFormElement.idl 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #import <DOM/HTMLFormControlsCollection.idl>
  2. #import <HTML/HTMLElement.idl>
  3. // https://html.spec.whatwg.org/multipage/forms.html#attr-form-autocomplete
  4. [MissingValueDefault=on, InvalidValueDefault=on]
  5. enum Autocomplete {
  6. "on",
  7. "off"
  8. };
  9. // https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#attr-fs-enctype
  10. [MissingValueDefault=application/x-www-form-urlencoded, InvalidValueDefault=application/x-www-form-urlencoded]
  11. enum EnctypeAttribute {
  12. "application/x-www-form-urlencoded",
  13. "multipart/form-data",
  14. "text/plain"
  15. };
  16. // https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#selectionmode
  17. enum SelectionMode {
  18. "select",
  19. "start",
  20. "end",
  21. "preserve"
  22. };
  23. // https://html.spec.whatwg.org/multipage/semantics.html#htmlformelement
  24. [Exposed=Window, LegacyOverrideBuiltIns, LegacyUnenumerableNamedProperties]
  25. interface HTMLFormElement : HTMLElement {
  26. [HTMLConstructor] constructor();
  27. [CEReactions, Reflect=accept-charset] attribute DOMString acceptCharset;
  28. [CEReactions] attribute USVString action;
  29. [CEReactions, Enumerated=Autocomplete, Reflect] attribute DOMString autocomplete;
  30. [CEReactions, Enumerated=EnctypeAttribute, Reflect] attribute DOMString enctype;
  31. [CEReactions, Enumerated=EnctypeAttribute, Reflect=enctype] attribute DOMString encoding;
  32. [CEReactions] attribute DOMString method;
  33. [CEReactions, Reflect] attribute DOMString name;
  34. [CEReactions, Reflect=novalidate] attribute boolean noValidate;
  35. [CEReactions, Reflect] attribute DOMString target;
  36. [CEReactions, Reflect] attribute DOMString rel;
  37. [SameObject, PutForwards=value] readonly attribute DOMTokenList relList;
  38. [SameObject] readonly attribute HTMLFormControlsCollection elements;
  39. readonly attribute unsigned long length;
  40. getter Element (unsigned long index);
  41. getter (RadioNodeList or Element) (DOMString name);
  42. undefined submit();
  43. undefined requestSubmit(optional HTMLElement? submitter = null);
  44. [CEReactions] undefined reset();
  45. boolean checkValidity();
  46. boolean reportValidity();
  47. };