HTMLTextAreaElement.webidl (3472B)
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* This Source Code Form is subject to the terms of the Mozilla Public 3 * License, v. 2.0. If a copy of the MPL was not distributed with this file, 4 * You can obtain one at http://mozilla.org/MPL/2.0/. 5 * 6 * The origin of this IDL file is 7 * http://www.whatwg.org/specs/web-apps/current-work/#the-textarea-element 8 * http://www.whatwg.org/specs/web-apps/current-work/#other-elements,-attributes-and-apis 9 * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and 10 * Opera Software ASA. You are granted a license to use, reproduce 11 * and create derivative works of this document. 12 */ 13 14 interface nsIEditor; 15 interface XULControllers; 16 17 [Exposed=Window] 18 interface HTMLTextAreaElement : HTMLElement { 19 [HTMLConstructor] constructor(); 20 21 [CEReactions, SetterThrows, Pure] 22 attribute DOMString autocomplete; 23 [CEReactions, SetterThrows, Pure] 24 attribute unsigned long cols; 25 [CEReactions, Pure, SetterThrows] 26 attribute DOMString dirName; 27 [CEReactions, SetterThrows, Pure] 28 attribute boolean disabled; 29 [Pure] 30 readonly attribute HTMLFormElement? form; 31 // attribute DOMString inputMode; 32 [CEReactions, SetterThrows, Pure] 33 attribute long maxLength; 34 [CEReactions, SetterThrows, Pure] 35 attribute long minLength; 36 [CEReactions, SetterThrows, Pure] 37 attribute DOMString name; 38 [CEReactions, SetterThrows, Pure] 39 attribute DOMString placeholder; 40 [CEReactions, SetterThrows, Pure] 41 attribute boolean readOnly; 42 [CEReactions, SetterThrows, Pure] 43 attribute boolean required; 44 [CEReactions, SetterThrows, Pure] 45 attribute unsigned long rows; 46 [CEReactions, SetterThrows, Pure] 47 attribute DOMString wrap; 48 49 [Constant] 50 readonly attribute DOMString type; 51 [CEReactions, Throws, Pure] 52 attribute DOMString defaultValue; 53 [CEReactions, SetterThrows] attribute [LegacyNullToEmptyString] DOMString value; 54 [BinaryName="getTextLength"] 55 readonly attribute unsigned long textLength; 56 57 readonly attribute boolean willValidate; 58 readonly attribute ValidityState validity; 59 [Throws] 60 readonly attribute DOMString validationMessage; 61 boolean checkValidity(); 62 boolean reportValidity(); 63 undefined setCustomValidity(DOMString error); 64 65 readonly attribute NodeList labels; 66 67 undefined select(); 68 [Throws] 69 attribute unsigned long? selectionStart; 70 [Throws] 71 attribute unsigned long? selectionEnd; 72 [Throws] 73 attribute DOMString? selectionDirection; 74 [Throws] 75 undefined setRangeText(DOMString replacement); 76 [Throws] 77 undefined setRangeText(DOMString replacement, unsigned long start, 78 unsigned long end, optional SelectionMode selectionMode = "preserve"); 79 [Throws] 80 undefined setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction); 81 }; 82 83 partial interface HTMLTextAreaElement { 84 // Chrome-only Mozilla extensions 85 86 [Throws, ChromeOnly] 87 readonly attribute XULControllers controllers; 88 }; 89 90 HTMLTextAreaElement includes MozEditableElement; 91 92 partial interface HTMLTextAreaElement { 93 [ChromeOnly] 94 attribute DOMString previewValue; 95 // A string indicating that the value of the element has been autofilled: 96 // either "filled", "preview" or "". 97 [ChromeOnly] 98 attribute DOMString autofillState; 99 100 [ChromeOnly] 101 AutocompleteInfo getAutocompleteInfo(); 102 };