SelectElement.hx 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. /*
  2. * Copyright (C)2005-2013 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, do not edit!
  23. package js.html;
  24. /** <code>DOM select</code> elements share all of the properties and methods of other HTML elements described in the <code><a rel="custom" href="/api/js/html/Element">element</a></code>
  25. section. They also have the specialized interface <a class="external" title="http://dev.w3.org/html5/spec/the-button-element.html#htmlselectelement" rel="external" href="http://dev.w3.org/html5/spec/the-button-element.html#htmlselectelement" target="_blank">HTMLSelectElement</a> (or
  26. <span><a rel="custom" href="https://developer.mozilla.org/en/HTML">HTML 4</a></span> <a class="external" title="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-94282980" rel="external" href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-94282980" target="_blank">HTMLSelectElement</a>).<br><br>
  27. Documentation for this class was provided by <a href="https://developer.mozilla.org/en/DOM/HTMLSelectElement">MDN</a>. */
  28. @:native("HTMLSelectElement")
  29. extern class SelectElement extends Element implements ArrayAccess<Node>
  30. {
  31. /** Reflects the
  32. <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/select#attr-autofocus">autofocus</a></code>
  33. HTML attribute, which indicates whether the control should have input focus when the page loads, unless the user overrides it, for example by typing in a different control. Only one form-associated element in a document can have this attribute specified.
  34. <span><a rel="custom" href="https://developer.mozilla.org/en/HTML/HTML5">HTML5</a></span>
  35. <span title="(Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)
  36. ">Requires Gecko 2.0</span> */
  37. var autofocus : Bool;
  38. /** Reflects the
  39. <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/select#attr-disabled">disabled</a></code>
  40. HTML attribute, which indicates whether the control is disabled. If it is disabled, it does not accept clicks. */
  41. var disabled : Bool;
  42. /** The form that this element is associated with. If this element is a descendant of a form element, then this attribute is the ID of that form element. If the element is not a descendant of a form element, then: <ul> <li>
  43. <span><a rel="custom" href="https://developer.mozilla.org/en/HTML/HTML5">HTML5</a></span> The attribute can be the ID of any form element in the same document.</li> <li>
  44. <span><a rel="custom" href="https://developer.mozilla.org/en/HTML">HTML 4</a></span> The attribute is null.</li> </ul> <strong>Read only.</strong> */
  45. var form(default,null) : FormElement;
  46. /** A list of label elements associated with this select element. */
  47. var labels(default,null) : NodeList;
  48. /** The number of <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/option">&lt;option&gt;</a></code>
  49. elements in this <code>select</code> element. Setter throws DOMException. */
  50. var length : Int;
  51. /** Reflects the
  52. <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/select#attr-multiple">multiple</a></code>
  53. HTML attribute, whichindicates whether multiple items can be selected. */
  54. var multiple : Bool;
  55. /** Reflects the
  56. <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/select#attr-name">name</a></code>
  57. HTML attribute, containing the name of this control used by servers and DOM search functions. */
  58. var name : String;
  59. /** The set of <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/option">&lt;option&gt;</a></code>
  60. elements contained by this element. <strong>Read only.</strong> */
  61. var options(default,null) : HTMLOptionsCollection;
  62. /** Reflects the
  63. <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/select#attr-required">required</a></code>
  64. HTML attribute, which indicates whether the user is required to select a value before submitting the form.
  65. <span><a rel="custom" href="https://developer.mozilla.org/en/HTML/HTML5">HTML5</a></span>
  66. <span title="(Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)
  67. ">Requires Gecko 2.0</span> */
  68. var required : Bool;
  69. /** The index of the first selected <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/option">&lt;option&gt;</a></code>
  70. element. */
  71. var selectedIndex : Int;
  72. /** The set of options that are selected.
  73. <span><a rel="custom" href="https://developer.mozilla.org/en/HTML/HTML5">HTML5</a></span> */
  74. var selectedOptions(default,null) : HTMLCollection;
  75. /** Reflects the
  76. <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/select#attr-size">size</a></code>
  77. HTML attribute, which contains the number of visible items in the control. The default is 1,
  78. <span><a rel="custom" href="https://developer.mozilla.org/en/HTML/HTML5">HTML5</a></span> unless <strong>multiple</strong> is true, in which case it is 4. */
  79. var size : Int;
  80. /** The form control's type. When <strong>multiple</strong> is true, it returns <code>select-multiple</code>; otherwise, it returns <code>select-one</code>.<strong>Read only.</strong> */
  81. var type(default,null) : String;
  82. /** A localized message that describes the validation constraints that the control does not satisfy (if any). This attribute is the empty string if the control is not a candidate for constraint validation (<strong>willValidate</strong> is false), or it satisfies its constraints.<strong>Read only.</strong>
  83. <span><a rel="custom" href="https://developer.mozilla.org/en/HTML/HTML5">HTML5</a></span>
  84. <span title="(Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)
  85. ">Requires Gecko 2.0</span> */
  86. var validationMessage(default,null) : String;
  87. /** The validity states that this control is in. <strong>Read only.</strong>
  88. <span><a rel="custom" href="https://developer.mozilla.org/en/HTML/HTML5">HTML5</a></span>
  89. <span title="(Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)
  90. ">Requires Gecko 2.0</span> */
  91. var validity(default,null) : ValidityState;
  92. /** The value of this form control, that is, of the first selected option. */
  93. var value : String;
  94. /** Indicates whether the button is a candidate for constraint validation. It is false if any conditions bar it from constraint validation. <strong>Read only.</strong>
  95. <span><a rel="custom" href="https://developer.mozilla.org/en/HTML/HTML5">HTML5</a></span>
  96. <span title="(Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)
  97. ">Requires Gecko 2.0</span> */
  98. var willValidate(default,null) : Bool;
  99. function add( element : Element, before : Element ) : Void;
  100. function checkValidity() : Bool;
  101. function item( index : Int ) : Node;
  102. function namedItem( name : String ) : Node;
  103. function setCustomValidity( error : String ) : Void;
  104. }