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 DOMString type;
33 readonly attribute HTMLOptionsCollection options;
34 [CEReactions, SetterThrows, Pure]
35 attribute unsigned long length;
36 getter Element? item(unsigned long index);
37 HTMLOptionElement? namedItem(DOMString name);
39 undefined add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null);
41 undefined remove(long index);
43 setter undefined (unsigned long index, HTMLOptionElement? option);
45 readonly attribute HTMLCollection selectedOptions;
47 attribute long selectedIndex;
49 attribute DOMString value;
51 readonly attribute boolean willValidate;
52 readonly attribute ValidityState validity;
54 readonly attribute DOMString validationMessage;
55 boolean checkValidity();
56 boolean reportValidity();
57 undefined setCustomValidity(DOMString error);
59 [Throws, Pref="dom.select.showPicker.enabled"]
60 undefined showPicker();
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 undefined userFinishedInteracting(boolean changed);
75 readonly attribute boolean isCombobox;
77 attribute boolean openInParentProcess;
79 AutocompleteInfo getAutocompleteInfo();
81 attribute DOMString previewValue;