HTMLFormElement.idl 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. #import <HTML/HTMLElement.idl>
  2. #import <HTML/HTMLFormControlsCollection.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#attr-fs-method
  17. [MissingValueDefault=get, InvalidValueDefault=get]
  18. enum MethodAttribute {
  19. "get",
  20. "post",
  21. "dialog"
  22. };
  23. // https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#attr-fs-formenctype
  24. [InvalidValueDefault=application/x-www-form-urlencoded]
  25. enum FormEnctypeAttribute {
  26. "application/x-www-form-urlencoded",
  27. "multipart/form-data",
  28. "text/plain"
  29. };
  30. // https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#attr-fs-formmethod
  31. [InvalidValueDefault=get]
  32. enum FormMethodAttribute {
  33. "get",
  34. "post",
  35. "dialog"
  36. };
  37. // https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#selectionmode
  38. enum SelectionMode {
  39. "select",
  40. "start",
  41. "end",
  42. "preserve"
  43. };
  44. // https://html.spec.whatwg.org/multipage/semantics.html#htmlformelement
  45. [Exposed=Window, LegacyOverrideBuiltIns, LegacyUnenumerableNamedProperties]
  46. interface HTMLFormElement : HTMLElement {
  47. [HTMLConstructor] constructor();
  48. [CEReactions, Reflect=accept-charset] attribute DOMString acceptCharset;
  49. [CEReactions] attribute USVString action;
  50. [CEReactions, Enumerated=Autocomplete, Reflect] attribute DOMString autocomplete;
  51. [CEReactions, Enumerated=EnctypeAttribute, Reflect] attribute DOMString enctype;
  52. [CEReactions, Enumerated=EnctypeAttribute, Reflect=enctype] attribute DOMString encoding;
  53. [CEReactions, Enumerated=MethodAttribute, Reflect] attribute DOMString method;
  54. [CEReactions, Reflect] attribute DOMString name;
  55. [CEReactions, Reflect=novalidate] attribute boolean noValidate;
  56. [CEReactions, Reflect] attribute DOMString target;
  57. [CEReactions, Reflect] attribute DOMString rel;
  58. [SameObject, PutForwards=value] readonly attribute DOMTokenList relList;
  59. [SameObject] readonly attribute HTMLFormControlsCollection elements;
  60. readonly attribute unsigned long length;
  61. getter Element (unsigned long index);
  62. getter (RadioNodeList or Element) (DOMString name);
  63. undefined submit();
  64. undefined requestSubmit(optional HTMLElement? submitter = null);
  65. [CEReactions] undefined reset();
  66. boolean checkValidity();
  67. boolean reportValidity();
  68. };