dom/webidl/HTMLTextAreaElement.webidl

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:14d011563d18
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 MozControllers;
16
17 interface HTMLTextAreaElement : HTMLElement {
18 // attribute DOMString autocomplete;
19 [SetterThrows, Pure]
20 attribute boolean autofocus;
21 [SetterThrows, Pure]
22 attribute unsigned long cols;
23 // attribute DOMString dirName;
24 [SetterThrows, Pure]
25 attribute boolean disabled;
26 [Pure]
27 readonly attribute HTMLFormElement? form;
28 // attribute DOMString inputMode;
29 [SetterThrows, Pure]
30 attribute long maxLength;
31 [SetterThrows, Pure]
32 attribute DOMString name;
33 [SetterThrows, Pure]
34 attribute DOMString placeholder;
35 [SetterThrows, Pure]
36 attribute boolean readOnly;
37 [SetterThrows, Pure]
38 attribute boolean required;
39 [SetterThrows, Pure]
40 attribute unsigned long rows;
41 [SetterThrows, Pure]
42 attribute DOMString wrap;
43
44 [Constant]
45 readonly attribute DOMString type;
46 [SetterThrows, Pure]
47 attribute DOMString defaultValue;
48 [TreatNullAs=EmptyString] attribute DOMString value;
49 readonly attribute unsigned long textLength;
50
51 readonly attribute boolean willValidate;
52 readonly attribute ValidityState validity;
53 readonly attribute DOMString validationMessage;
54 boolean checkValidity();
55 void setCustomValidity(DOMString error);
56
57 // readonly attribute NodeList labels;
58
59 void select();
60 [Throws]
61 attribute unsigned long selectionStart;
62 [Throws]
63 attribute unsigned long selectionEnd;
64 [Throws]
65 attribute DOMString selectionDirection;
66 [Throws]
67 void setRangeText(DOMString replacement);
68 [Throws]
69 void setRangeText(DOMString replacement, unsigned long start,
70 unsigned long end, optional SelectionMode selectionMode = "preserve");
71 [Throws]
72 void setSelectionRange(unsigned long start, unsigned long end, optional DOMString direction);
73 };
74
75 partial interface HTMLTextAreaElement {
76 // Mirrored chrome-only Mozilla extensions to nsIDOMHTMLTextAreaElement.
77 // Please make sure to update this list of nsIDOMHTMLTextAreaElement changes.
78
79 [Throws, ChromeOnly]
80 readonly attribute MozControllers controllers;
81 };
82
83 partial interface HTMLTextAreaElement {
84 // Mirrored chrome-only nsIDOMNSEditableElement methods. Please make sure
85 // to update this list if nsIDOMNSEditableElement changes.
86
87 [ChromeOnly]
88 readonly attribute nsIEditor? editor;
89
90 // This is similar to set .value on nsIDOMInput/TextAreaElements, but
91 // handling of the value change is closer to the normal user input, so
92 // 'change' event for example will be dispatched when focusing out the
93 // element.
94 [ChromeOnly]
95 void setUserInput(DOMString input);
96 };

mercurial