ButtonElement.hx 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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. /** DOM&nbsp;<code>Button </code>objects expose the <a class=" external" title="http://www.w3.org/TR/html5/the-button-element.html#the-button-element" rel="external" href="http://www.w3.org/TR/html5/the-button-element.html#the-button-element" target="_blank">HTMLButtonElement</a>
  25. <span><a rel="custom" href="https://developer.mozilla.org/en/HTML/HTML5">HTML5</a></span>&nbsp;(or <a class=" external" title="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-34812697" rel="external" href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-34812697" target="_blank">HTMLButtonElement</a>
  26. <span><a rel="custom" href="https://developer.mozilla.org/en/HTML">HTML 4</a></span>) interface, which provides properties and methods (beyond the <a href="/api/js/html/Element" rel="internal">element</a> object interface they also have available to them by inheritance) for manipulating the layout and presentation of button elements.<br><br>
  27. Documentation for this class was provided by <a href="https://developer.mozilla.org/en/DOM/HTMLButtonElement">MDN</a>. */
  28. @:native("HTMLButtonElement")
  29. extern class ButtonElement extends Element
  30. {
  31. /** 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. */
  32. var autofocus : Bool;
  33. /** The control is disabled, meaning that it does not accept any clicks. */
  34. var disabled : Bool;
  35. /** <p>The form that this button is associated with. If the button is a descendant of a form element, then this attribute is the ID of that form element.</p> <p>If the button is not a descendant of a form element, then:</p> <ul> <li>
  36. <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>
  37. <span><a rel="custom" href="https://developer.mozilla.org/en/HTML">HTML 4</a></span> The attribute is null.</li> </ul> */
  38. var form(default,null) : FormElement;
  39. /** The URI&nbsp;of a program that processes information submitted by the button. If specified, this attribute overrides the
  40. <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/form#attr-action">action</a></code>
  41. attribute of the <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/form">&lt;form&gt;</a></code>
  42. element that owns this element. */
  43. var formAction : String;
  44. var formEnctype : String;
  45. /** The HTTP&nbsp;method that the browser uses to submit the form. If specified, this attribute overrides the
  46. <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/form#attr-method">method</a></code>
  47. attribute of the <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/form">&lt;form&gt;</a></code>
  48. element that owns this element. */
  49. var formMethod : String;
  50. /** Indicates that the form is not to be validated when it is submitted. If specified, this attribute overrides the
  51. <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/form#attr-enctype">enctype</a></code>
  52. attribute of the <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/form">&lt;form&gt;</a></code>
  53. element that owns this element. */
  54. var formNoValidate : Bool;
  55. /** A name or keyword indicating where to display the response that is received after submitting the form. If specified, this attribute overrides the
  56. <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/form#attr-target">target</a></code>
  57. attribute of the <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/form">&lt;form&gt;</a></code>
  58. element that owns this element. */
  59. var formTarget : String;
  60. /** A list of <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/label">&lt;label&gt;</a></code>
  61. elements that are labels for this button. */
  62. var labels(default,null) : NodeList;
  63. /** The name of the object when submitted with a form.
  64. <span><a rel="custom" href="https://developer.mozilla.org/en/HTML/HTML5">HTML5</a></span> If specified, it must not be the empty string. */
  65. var name : String;
  66. /** <p>Indicates the behavior of the button. This is an enumerated attribute with the following possible values:</p> <ul> <li><code>submit</code>:&nbsp;The button submits the form. This is the default value if the attribute is not specified,
  67. <span><a rel="custom" href="https://developer.mozilla.org/en/HTML/HTML5">HTML5</a></span> or if it is dynamically changed to an empty or invalid value.</li> <li><code>reset</code>:&nbsp;The button resets the form.</li> <li><code>button</code>:&nbsp;The button does nothing.</li> </ul> */
  68. var type : String;
  69. /** 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. */
  70. var validationMessage(default,null) : String;
  71. /** The validity states that this button is in. */
  72. var validity(default,null) : ValidityState;
  73. /** The current form control value of the button.&nbsp; */
  74. var value : String;
  75. /** Indicates whether the button is a candidate for constraint validation. It is false if any conditions bar it from constraint validation. */
  76. var willValidate(default,null) : Bool;
  77. function checkValidity() : Bool;
  78. function setCustomValidity( error : String ) : Void;
  79. }