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/.
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.
15 interface XULControllers;
18 interface HTMLTextAreaElement : HTMLElement {
19 [HTMLConstructor] constructor();
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;
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;
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;
57 readonly attribute boolean willValidate;
58 readonly attribute ValidityState validity;
60 readonly attribute DOMString validationMessage;
61 boolean checkValidity();
62 boolean reportValidity();
63 undefined setCustomValidity(DOMString error);
65 readonly attribute NodeList labels;
69 attribute unsigned long? selectionStart;
71 attribute unsigned long? selectionEnd;
73 attribute DOMString? selectionDirection;
75 undefined setRangeText(DOMString replacement);
77 undefined setRangeText(DOMString replacement, unsigned long start,
78 unsigned long end, optional SelectionMode selectionMode = "preserve");
80 undefined setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction);
83 partial interface HTMLTextAreaElement {
84 // Chrome-only Mozilla extensions
87 readonly attribute XULControllers controllers;
90 HTMLTextAreaElement includes MozEditableElement;
92 partial interface HTMLTextAreaElement {
94 attribute DOMString previewValue;