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 DOMString autocomplete;
16 [CEReactions, SetterThrows, Pure]
17 attribute boolean disabled;
19 readonly attribute HTMLFormElement? form;
20 [CEReactions, SetterThrows, Pure]
21 attribute boolean multiple;
22 [CEReactions, SetterThrows, Pure]
23 attribute DOMString name;
24 [CEReactions, SetterThrows, Pure]
25 attribute boolean required;
26 [CEReactions, SetterThrows, Pure]
27 attribute unsigned long size;
30 readonly attribute boolean isCombobox;
33 readonly attribute DOMString type;
36 readonly attribute HTMLOptionsCollection options;
37 [CEReactions, SetterThrows, Pure]
38 attribute unsigned long length;
39 getter Element? item(unsigned long index);
40 HTMLOptionElement? namedItem(DOMString name);
42 undefined add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null);
44 undefined remove(long index);
46 setter undefined (unsigned long index, HTMLOptionElement? option);
48 readonly attribute HTMLCollection selectedOptions;
50 attribute long selectedIndex;
52 attribute DOMString value;
54 readonly attribute boolean willValidate;
55 readonly attribute ValidityState validity;
57 readonly attribute DOMString validationMessage;
58 boolean checkValidity();
59 boolean reportValidity();
60 undefined setCustomValidity(DOMString error);
62 readonly attribute NodeList labels;
64 // https://www.w3.org/Bugs/Public/show_bug.cgi?id=20720
69 // Chrome only interface
71 partial interface HTMLSelectElement {
73 attribute boolean openInParentProcess;
75 AutocompleteInfo getAutocompleteInfo();
77 attribute DOMString previewValue;