TextAreaElement.hx 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  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 <code>TextArea</code> objects expose the <a title="http://dev.w3.org/html5/spec/the-button-element.html#the-textarea-element" class=" external" rel="external" href="http://dev.w3.org/html5/spec/the-button-element.html#the-textarea-element" target="_blank">HTMLTextAreaElement</a> (or
  25. <span><a rel="custom" href="https://developer.mozilla.org/en/HTML">HTML 4</a></span> <code><a title="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-24874179" class="external" rel="external" href="http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-24874179" target="_blank">HTMLTextAreaElement</a></code>) interface, which provides special properties and methods (beyond the regular <a title="en/DOM/element" rel="internal" href="/api/js/html/Element">element</a> object interface they also have available to them by inheritance) for manipulating the layout and presentation of <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/textarea">&lt;textarea&gt;</a></code>
  26. elements.<br><br>
  27. Documentation for this class was provided by <a href="https://developer.mozilla.org/en/DOM/HTMLTextAreaElement">MDN</a>. */
  28. @:native("HTMLTextAreaElement")
  29. extern class TextAreaElement extends Element
  30. {
  31. /** Reflects the
  32. <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/textarea#attr-autofocus">autofocus</a></code>
  33. HTML&nbsp;attribute, indicating that the control should have input focus when the page loads */
  34. var autofocus : Bool;
  35. /** Reflects the
  36. <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/textarea#attr-cols">cols</a></code>
  37. HTML attribute, indicating the visible width of the text area. */
  38. var cols : Int;
  39. /** The control's default value, which behaves like the <strong><a title="en/DOM/element.textContent" rel="internal" href="https://developer.mozilla.org/En/DOM/Node.textContent">textContent</a></strong> property. */
  40. var defaultValue : String;
  41. var dirName : String;
  42. /** Reflects the
  43. <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/textarea#attr-disabled">disabled</a></code>
  44. HTML attribute, indicating that the control is not available for interaction. */
  45. var disabled : Bool;
  46. /** <p>The containing form element, if this element is in a form. If this element is not contained in a form element:</p> <ul> <li>
  47. <span><a rel="custom" href="https://developer.mozilla.org/en/HTML/HTML5">HTML5</a></span> this can be the
  48. <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/form#attr-id">id</a></code>
  49. attribute of any <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/form">&lt;form&gt;</a></code>
  50. element in the same document.</li> <li>
  51. <span><a rel="custom" href="https://developer.mozilla.org/en/HTML">HTML 4</a></span> this must be <code>null</code>.</li> </ul> */
  52. var form(default,null) : FormElement;
  53. /** A list of <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/label">&lt;label&gt;</a></code>
  54. elements that are labels for this element. */
  55. var labels(default,null) : NodeList;
  56. /** Reflects the
  57. <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/textarea#attr-maxlength">maxlength</a></code>
  58. HTML&nbsp;attribute, indicating the maximum number of characters the user can enter. This constraint is evaluated only when the value changes. Setter throws DOMException. */
  59. var maxLength : Int;
  60. /** Reflects
  61. <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/textarea#attr-name">name</a></code>
  62. HTML attribute, containing the name of the control. */
  63. var name : String;
  64. /** Reflects the
  65. <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/textarea#attr-placeholder">placeholder</a></code>
  66. HTML attribute, containing a hint to the user about what to enter in the control. */
  67. var placeholder : String;
  68. /** Reflects the
  69. <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/textarea#attr-readonly">readonly</a></code>
  70. HTML attribute, indicating that the user cannot modify the value of the control. */
  71. var readOnly : Bool;
  72. /** Reflects the
  73. <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/textarea#attr-required">required</a></code>
  74. HTML attribute, indicating that the user must specify a value before submitting the form. */
  75. var required : Bool;
  76. /** Reflects the
  77. <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/textarea#attr-rows">rows</a></code>
  78. HTML attribute, indicating the number of visible text lines for the control. */
  79. var rows : Int;
  80. /** The direction in which selection occurred. This is "forward" if selection was performed in the start-to-end direction of the current locale, or "backward" for the opposite direction. This can also be "none"&nbsp;if the direction is unknown." */
  81. var selectionDirection : String;
  82. /** The index of the end of selected text.
  83. <span><a rel="custom" href="https://developer.mozilla.org/en/HTML/HTML5">HTML5</a></span> If no text is selected, contains the index of the character that follows the input cursor. On being set, the control behaves as if <strong>setSelectionRange</strong>() had been called with this as the second argument, and <strong>selectionStart</strong> as the first argument. */
  84. var selectionEnd : Int;
  85. /** The index of the beginning of selected text.
  86. <span><a rel="custom" href="https://developer.mozilla.org/en/HTML/HTML5">HTML5</a></span> If no text is selected, contains the index of the character that follows the input cursor. On being set, the control behaves as if <strong>setSelectionRange</strong>() had been called with this as the first argument, and <strong>selectionEnd</strong> as the second argument. */
  87. var selectionStart : Int;
  88. /** The codepoint length of the control's value. */
  89. var textLength(default,null) : Int;
  90. /** The string <code>textarea</code>. */
  91. var type(default,null) : String;
  92. /** A localized message that describes the validation constraints that the control does not satisfy (if any). This is the empty string if the control is not a candidate for constraint validation (<strong>willValidate</strong> is false), or it satisfies its constraints. */
  93. var validationMessage(default,null) : String;
  94. /** The validity states that this element is in. */
  95. var validity(default,null) : ValidityState;
  96. /** The raw value contained in the control. */
  97. var value : String;
  98. /** Indicates whether the element is a candidate for constraint validation. It is false if any conditions bar it from constraint validation. */
  99. var willValidate(default,null) : Bool;
  100. /** Reflects the
  101. <code><a rel="custom" href="https://developer.mozilla.org/en/HTML/Element/textarea#attr-wrap">wrap</a></code>
  102. HTML attribute, indicating how the control wraps text. */
  103. var wrap : String;
  104. function checkValidity() : Bool;
  105. function select() : Void;
  106. function setCustomValidity( error : String ) : Void;
  107. /** Throws DOMException. */
  108. @:overload( function( replacement : String ) :Void {} )
  109. function setRangeText( replacement : String, start : Int, end : Int, selectionMode : String ) : Void;
  110. function setSelectionRange( start : Int, end : Int, ?direction : String ) : Void;
  111. }