2
0

FormElement.hx 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /*
  2. * Copyright (C)2005-2019 Haxe Foundation
  3. *
  4. * Permission is hereby granted, free of charge, to any person obtaining a
  5. * copy of this software and associated documentation files (the "Software"),
  6. * to deal in the Software without restriction, including without limitation
  7. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  8. * and/or sell copies of the Software, and to permit persons to whom the
  9. * Software is furnished to do so, subject to the following conditions:
  10. *
  11. * The above copyright notice and this permission notice shall be included in
  12. * all copies or substantial portions of the Software.
  13. *
  14. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  20. * DEALINGS IN THE SOFTWARE.
  21. */
  22. // This file is generated from mozilla\HTMLFormElement.webidl. Do not edit!
  23. package js.html;
  24. /**
  25. The `HTMLFormElement` interface represents a `form` element in the DOM; it allows access to and in some cases modification of aspects of the form, as well as access to its component elements.
  26. Documentation [HTMLFormElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/).
  27. @see <https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement>
  28. **/
  29. @:native("HTMLFormElement")
  30. extern class FormElement extends Element implements ArrayAccess<Element> {
  31. /**
  32. A `DOMString` reflecting the value of the form's `accept-charset` HTML attribute, representing the character encoding that the server accepts.
  33. **/
  34. var acceptCharset : String;
  35. /**
  36. A `DOMString` reflecting the value of the form's `action` HTML attribute, containing the URI of a program that processes the information submitted by the form.
  37. **/
  38. var action : String;
  39. /**
  40. A `DOMString` reflecting the value of the form's `autocomplete` HTML attribute, indicating whether the controls in this form can have their values automatically populated by the browser.
  41. **/
  42. var autocomplete : String;
  43. /**
  44. A `DOMString` reflecting the value of the form's `enctype` HTML attribute, indicating the type of content that is used to transmit the form to the server. Only specified values can be set. The two properties are synonyms.
  45. **/
  46. var enctype : String;
  47. /**
  48. A `DOMString` reflecting the value of the form's `enctype` HTML attribute, indicating the type of content that is used to transmit the form to the server. Only specified values can be set. The two properties are synonyms.
  49. **/
  50. var encoding : String;
  51. /**
  52. A `DOMString` reflecting the value of the form's `method` HTML attribute, indicating the HTTP method used to submit the form. Only specified values can be set.
  53. **/
  54. var method : String;
  55. /**
  56. A `DOMString` reflecting the value of the form's `name` HTML attribute, containing the name of the form.
  57. **/
  58. var name : String;
  59. /**
  60. A `Boolean` reflecting the value of the form's  `novalidate` HTML attribute, indicating whether the form should not be validated.
  61. **/
  62. var noValidate : Bool;
  63. /**
  64. A `DOMString` reflecting the value of the form's `target` HTML attribute, indicating where to display the results received from submitting the form.
  65. **/
  66. var target : String;
  67. /**
  68. A `HTMLFormControlsCollection` holding all form controls belonging to this form element.
  69. **/
  70. var elements(default,null) : HTMLCollection;
  71. /**
  72. A `long` reflecting  the number of controls in the form.
  73. **/
  74. var length(default,null) : Int;
  75. /**
  76. Submits the form to the server.
  77. @throws DOMError
  78. **/
  79. function submit() : Void;
  80. /**
  81. Resets the form to its initial state.
  82. **/
  83. function reset() : Void;
  84. /**
  85. Returns `true` if the element's child controls are subject to constraint validation and satisfy those contraints; returns `false` if some controls do not satisfy their constraints. Fires an event named `invalid` at any control that does not satisfy its constraints; such controls are considered invalid if the event is not canceled. It is up to the programmer to decide how to respond to `false`.
  86. **/
  87. function checkValidity() : Bool;
  88. /**
  89. Returns `true` if the element's child controls satisfy their validation constraints. When `false` is returned, cancelable `invalid` events are fired for each invalid child and validation problems are reported to the user.
  90. **/
  91. function reportValidity() : Bool;
  92. }