Bug 1886946: Remove incorrect assertion that buffer is not-pinned. r=sfink
[gecko.git] / dom / webidl / HTMLSelectElement.webidl
blob88d7f5b8304d8cf5fd76facd0477c089c0ec2c67
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   [Pure]
30   readonly attribute DOMString type;
32   [Constant]
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);
38   [CEReactions, Throws]
39   undefined add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null);
40   [CEReactions]
41   undefined remove(long index);
42   [CEReactions, Throws]
43   setter undefined (unsigned long index, HTMLOptionElement? option);
45   readonly attribute HTMLCollection selectedOptions;
46   [Pure]
47   attribute long selectedIndex;
48   [Pure]
49   attribute DOMString value;
51   readonly attribute boolean willValidate;
52   readonly attribute ValidityState validity;
53   [Throws]
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
65   [CEReactions]
66   undefined remove();
69 // Chrome only interface
71 partial interface HTMLSelectElement {
72   [ChromeOnly]
73   undefined userFinishedInteracting(boolean changed);
74   [ChromeOnly, Pure]
75   readonly attribute boolean isCombobox;
76   [ChromeOnly]
77   attribute boolean openInParentProcess;
78   [ChromeOnly]
79   AutocompleteInfo getAutocompleteInfo();
80   [ChromeOnly]
81   attribute DOMString previewValue;