Bug 1852740: add tests for the `fetchpriority` attribute in Link headers. r=necko...
[gecko.git] / dom / webidl / HTMLSelectElement.webidl
blobbd352adb96acf979a93e098814dccf08ace71da3
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  */
10 [Exposed=Window]
11 interface HTMLSelectElement : HTMLElement {
12   [HTMLConstructor] constructor();
14   [CEReactions, SetterThrows, Pure]
15   attribute DOMString autocomplete;
16   [CEReactions, SetterThrows, Pure]
17   attribute boolean disabled;
18   [Pure]
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;
29   [ChromeOnly, Pure]
30   readonly attribute boolean isCombobox;
32   [Pure]
33   readonly attribute DOMString type;
35   [Constant]
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);
41   [CEReactions, Throws]
42   undefined add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null);
43   [CEReactions]
44   undefined remove(long index);
45   [CEReactions, Throws]
46   setter undefined (unsigned long index, HTMLOptionElement? option);
48   readonly attribute HTMLCollection selectedOptions;
49   [Pure]
50   attribute long selectedIndex;
51   [Pure]
52   attribute DOMString value;
54   readonly attribute boolean willValidate;
55   readonly attribute ValidityState validity;
56   [Throws]
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
65   [CEReactions]
66   undefined remove();
69 // Chrome only interface
71 partial interface HTMLSelectElement {
72   [ChromeOnly]
73   attribute boolean openInParentProcess;
74   [ChromeOnly]
75   AutocompleteInfo getAutocompleteInfo();
76   [ChromeOnly]
77   attribute DOMString previewValue;