OptionElement.hx 4.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. /** <p>DOM&nbsp;<em>option</em> elements elements share all of the properties and methods of other HTML elements described in the <a title="en/DOM/element" rel="internal" href="/api/js/html/Element">element</a> section. They also have the specialized interface <a title="http://dev.w3.org/html5/spec/the-button-element.html#htmloptionelement" class=" external" rel="external" href="http://dev.w3.org/html5/spec/the-button-element.html#htmloptionelement" target="_blank">HTMLOptionElement</a> (or
  25. <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-70901257" rel="external" href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-70901257" target="_blank">HTMLOptionElement</a>).</p>
  26. <p>No methods are defined on this interface.</p><br><br>
  27. Documentation for this class was provided by <a href="https://developer.mozilla.org/en/DOM/HTMLOptionElement">MDN</a>. */
  28. @:native("HTMLOptionElement")
  29. extern class OptionElement extends Element
  30. {
  31. /** Reflects the value of the
  32. <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/option#attr-selected">selected</a></code>
  33. HTML attribute. which indicates whether the option is selected by default. */
  34. var defaultSelected : Bool;
  35. /** Reflects the value of the
  36. <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/option#attr-disabled">disabled</a></code>
  37. HTML&nbsp;attribute, which indicates that the option is unavailable to be selected. An option can also be disabled if it is a child of an <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/optgroup">&lt;optgroup&gt;</a></code>
  38. element that is disabled. */
  39. var disabled : Bool;
  40. /** If the option is a descendent of a <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/select">&lt;select&gt;</a></code>
  41. element, then this property has the same value as the <code>form</code> property of the corresponding {{DomXref("HTMLSelectElement") object; otherwise, it is null. */
  42. var form(default,null) : FormElement;
  43. /** The position of the option within the list of options it belongs to, in tree-order. If the option is not part of a list of options, the value is 0. */
  44. var index(default,null) : Int;
  45. /** Reflects the value of the
  46. <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/option#attr-label">label</a></code>
  47. HTML attribute, which provides a label for the option. If this attribute isn't specifically set, reading it returns the element's text content. */
  48. var label : String;
  49. /** Indicates whether the option is selected. */
  50. var selected : Bool;
  51. /** Contains the text content of the element. Setter throws DOMException. */
  52. var text : String;
  53. /** Reflects the value of the
  54. <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/option#attr-value">value</a></code>
  55. HTML attribute, if it exists; otherwise reflects value of the <code><a rel="internal" href="https://developer.mozilla.org/Article_not_found?uri=en/DOM/textContent" class="new">textContent</a></code>
  56. &nbsp;IDL&nbsp;attribute. */
  57. var value : String;
  58. function new() : Void;
  59. }