|
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 |
|
4 * file, 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/html/#the-select-element |
|
8 */ |
|
9 |
|
10 interface HTMLSelectElement : HTMLElement { |
|
11 [SetterThrows, Pure] |
|
12 attribute boolean autofocus; |
|
13 [SetterThrows, Pure] |
|
14 attribute boolean disabled; |
|
15 [Pure] |
|
16 readonly attribute HTMLFormElement? form; |
|
17 [SetterThrows, Pure] |
|
18 attribute boolean multiple; |
|
19 [SetterThrows, Pure] |
|
20 attribute DOMString name; |
|
21 [SetterThrows, Pure] |
|
22 attribute boolean required; |
|
23 [SetterThrows, Pure] |
|
24 attribute unsigned long size; |
|
25 |
|
26 [Pure] |
|
27 readonly attribute DOMString type; |
|
28 |
|
29 [Constant] |
|
30 readonly attribute HTMLOptionsCollection options; |
|
31 [SetterThrows, Pure] |
|
32 attribute unsigned long length; |
|
33 getter Element? item(unsigned long index); |
|
34 HTMLOptionElement? namedItem(DOMString name); |
|
35 [Throws] |
|
36 void add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null); |
|
37 void remove(long index); |
|
38 [Throws] |
|
39 setter creator void (unsigned long index, HTMLOptionElement? option); |
|
40 |
|
41 readonly attribute HTMLCollection selectedOptions; |
|
42 [SetterThrows, Pure] |
|
43 attribute long selectedIndex; |
|
44 [Pure] |
|
45 attribute DOMString value; |
|
46 |
|
47 readonly attribute boolean willValidate; |
|
48 readonly attribute ValidityState validity; |
|
49 readonly attribute DOMString validationMessage; |
|
50 boolean checkValidity(); |
|
51 void setCustomValidity(DOMString error); |
|
52 |
|
53 // NYI: readonly attribute NodeList labels; |
|
54 |
|
55 // https://www.w3.org/Bugs/Public/show_bug.cgi?id=20720 |
|
56 void remove(); |
|
57 }; |