Bug 1879816: Make nsCocoaWindow::Destroy close the window and let destruction happen...
[gecko.git] / dom / webidl / ElementInternals.webidl
blob4b86e730607c76346a21d7ee0dad496252164949
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  * https://html.spec.whatwg.org/#elementinternals
8  */
10 [Exposed=Window]
11 interface ElementInternals {
12   // Shadow root access
13   readonly attribute ShadowRoot? shadowRoot;
15   // Form-associated custom elements
16   [Throws]
17   undefined setFormValue((File or USVString or FormData)? value,
18                          optional (File or USVString or FormData)? state);
20   [Throws]
21   readonly attribute HTMLFormElement? form;
23   [Throws]
24   undefined setValidity(optional ValidityStateFlags flags = {},
25                         optional DOMString message,
26                         optional HTMLElement anchor);
27   [Throws]
28   readonly attribute boolean willValidate;
29   [Throws]
30   readonly attribute ValidityState validity;
31   [Throws]
32   readonly attribute DOMString validationMessage;
33   [Throws]
34   boolean checkValidity();
35   [Throws]
36   boolean reportValidity();
38   [Throws]
39   readonly attribute NodeList labels;
41   [Pref="dom.element.customstateset.enabled", SameObject] readonly attribute CustomStateSet states;
44 [Pref="dom.element.customstateset.enabled", Exposed=Window]
45 interface CustomStateSet {
46   setlike<DOMString>;
49 partial interface CustomStateSet {
50   // Setlike methods need to be overriden.
51   [Throws]
52   undefined add(DOMString state);
54   [Throws]
55   boolean delete(DOMString state);
57   [Throws]
58   undefined clear();
61 partial interface ElementInternals {
62   [ChromeOnly, Throws]
63   readonly attribute HTMLElement? validationAnchor;
66 ElementInternals includes ARIAMixin;
68 dictionary ValidityStateFlags {
69   boolean valueMissing = false;
70   boolean typeMismatch = false;
71   boolean patternMismatch = false;
72   boolean tooLong = false;
73   boolean tooShort = false;
74   boolean rangeUnderflow = false;
75   boolean rangeOverflow = false;
76   boolean stepMismatch = false;
77   boolean badInput = false;
78   boolean customError = false;