ElementInternals.idl 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #import <DOM/ShadowRoot.idl>
  2. // https://html.spec.whatwg.org/multipage/custom-elements.html#elementinternals
  3. [Exposed=Window]
  4. interface ElementInternals {
  5. // Shadow root access
  6. readonly attribute ShadowRoot? shadowRoot;
  7. // Form-associated custom elements
  8. [FIXME] undefined setFormValue((File or USVString or FormData)? value,
  9. optional (File or USVString or FormData)? state);
  10. [FIXME] readonly attribute HTMLFormElement? form;
  11. [FIXME] undefined setValidity(optional ValidityStateFlags flags = {},
  12. optional DOMString message,
  13. optional HTMLElement anchor);
  14. [FIXME] readonly attribute boolean willValidate;
  15. [FIXME] readonly attribute ValidityState validity;
  16. [FIXME] readonly attribute DOMString validationMessage;
  17. [FIXME] boolean checkValidity();
  18. [FIXME] boolean reportValidity();
  19. [FIXME] readonly attribute NodeList labels;
  20. // Custom state pseudo-class
  21. [FIXME, SameObject] readonly attribute CustomStateSet states;
  22. };
  23. // Accessibility semantics
  24. // ElementInternals includes ARIAMixin;
  25. dictionary ValidityStateFlags {
  26. boolean valueMissing = false;
  27. boolean typeMismatch = false;
  28. boolean patternMismatch = false;
  29. boolean tooLong = false;
  30. boolean tooShort = false;
  31. boolean rangeUnderflow = false;
  32. boolean rangeOverflow = false;
  33. boolean stepMismatch = false;
  34. boolean badInput = false;
  35. boolean customError = false;
  36. };