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 * https://html.spec.whatwg.org/#elementinternals
11 interface ElementInternals {
13 readonly attribute ShadowRoot? shadowRoot;
15 // Form-associated custom elements
17 undefined setFormValue((File or USVString or FormData)? value,
18 optional (File or USVString or FormData)? state);
21 readonly attribute HTMLFormElement? form;
24 undefined setValidity(optional ValidityStateFlags flags = {},
25 optional DOMString message,
26 optional HTMLElement anchor);
28 readonly attribute boolean willValidate;
30 readonly attribute ValidityState validity;
32 readonly attribute DOMString validationMessage;
34 boolean checkValidity();
36 boolean reportValidity();
39 readonly attribute NodeList labels;
42 partial interface ElementInternals {
44 readonly attribute HTMLElement? validationAnchor;
47 ElementInternals includes AccessibilityRole;
48 ElementInternals includes AriaAttributes;
50 dictionary ValidityStateFlags {
51 boolean valueMissing = false;
52 boolean typeMismatch = false;
53 boolean patternMismatch = false;
54 boolean tooLong = false;
55 boolean tooShort = false;
56 boolean rangeUnderflow = false;
57 boolean rangeOverflow = false;
58 boolean stepMismatch = false;
59 boolean badInput = false;
60 boolean customError = false;