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/.
6 * The origin of this IDL file is
7 * http://www.whatwg.org/html/#the-select-element
11 interface HTMLSelectElement : HTMLElement {
12 [HTMLConstructor] constructor();
14 [CEReactions, SetterThrows, Pure]
15 attribute boolean autofocus;
16 [CEReactions, SetterThrows, Pure]
17 attribute DOMString autocomplete;
18 [CEReactions, SetterThrows, Pure]
19 attribute boolean disabled;
21 readonly attribute HTMLFormElement? form;
22 [CEReactions, SetterThrows, Pure]
23 attribute boolean multiple;
24 [CEReactions, SetterThrows, Pure]
25 attribute DOMString name;
26 [CEReactions, SetterThrows, Pure]
27 attribute boolean required;
28 [CEReactions, SetterThrows, Pure]
29 attribute unsigned long size;
32 readonly attribute boolean isCombobox;
35 readonly attribute DOMString type;
38 readonly attribute HTMLOptionsCollection options;
39 [CEReactions, SetterThrows, Pure]
40 attribute unsigned long length;
41 getter Element? item(unsigned long index);
42 HTMLOptionElement? namedItem(DOMString name);
44 undefined add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null);
46 undefined remove(long index);
48 setter undefined (unsigned long index, HTMLOptionElement? option);
50 readonly attribute HTMLCollection selectedOptions;
52 attribute long selectedIndex;
54 attribute DOMString value;
56 readonly attribute boolean willValidate;
57 readonly attribute ValidityState validity;
59 readonly attribute DOMString validationMessage;
60 boolean checkValidity();
61 boolean reportValidity();
62 undefined setCustomValidity(DOMString error);
64 readonly attribute NodeList labels;
66 // https://www.w3.org/Bugs/Public/show_bug.cgi?id=20720
71 // Chrome only interface
73 partial interface HTMLSelectElement {
75 attribute boolean openInParentProcess;
77 AutocompleteInfo getAutocompleteInfo();
79 attribute DOMString previewValue;