2024-02-03 12:10:21 -07:00
|
|
|
#import <Animations/Animatable.idl>
|
2023-01-28 22:23:16 +00:00
|
|
|
#import <ARIA/ARIAMixin.idl>
|
2025-08-11 14:27:07 +01:00
|
|
|
#import <CSS/StylePropertyMapReadOnly.idl>
|
2022-11-05 04:37:40 +00:00
|
|
|
#import <DOM/Attr.idl>
|
2022-07-27 21:14:16 +01:00
|
|
|
#import <DOM/ChildNode.idl>
|
2022-02-15 22:40:51 +03:30
|
|
|
#import <DOM/DOMTokenList.idl>
|
|
|
|
#import <DOM/NamedNodeMap.idl>
|
|
|
|
#import <DOM/Node.idl>
|
|
|
|
#import <DOM/NodeList.idl>
|
2022-07-27 19:51:49 +01:00
|
|
|
#import <DOM/ParentNode.idl>
|
2023-01-28 20:37:46 +01:00
|
|
|
#import <DOM/ShadowRoot.idl>
|
2023-09-05 13:07:35 -04:00
|
|
|
#import <DOM/Slottable.idl>
|
2022-02-15 22:40:51 +03:30
|
|
|
#import <Geometry/DOMRect.idl>
|
|
|
|
#import <Geometry/DOMRectList.idl>
|
2023-09-05 13:07:35 -04:00
|
|
|
#import <HTML/HTMLSlotElement.idl>
|
2023-03-06 20:53:49 +00:00
|
|
|
#import <HTML/Window.idl>
|
2022-10-04 19:52:25 +02:00
|
|
|
|
|
|
|
enum ScrollLogicalPosition { "start", "center", "end", "nearest" };
|
2025-02-12 16:38:32 +00:00
|
|
|
// https://drafts.csswg.org/cssom-view-1/#dictdef-scrollintoviewoptions
|
2022-10-04 19:52:25 +02:00
|
|
|
dictionary ScrollIntoViewOptions : ScrollOptions {
|
|
|
|
ScrollLogicalPosition block = "start";
|
|
|
|
ScrollLogicalPosition inline = "nearest";
|
2025-02-12 16:38:32 +00:00
|
|
|
ScrollIntoViewContainer container = "all";
|
2022-10-04 19:52:25 +02:00
|
|
|
};
|
|
|
|
|
2025-02-12 16:38:32 +00:00
|
|
|
enum ScrollIntoViewContainer { "all", "nearest" };
|
|
|
|
|
2024-06-24 22:48:27 +02:00
|
|
|
// https://drafts.csswg.org/cssom-view-1/#dictdef-checkvisibilityoptions
|
|
|
|
dictionary CheckVisibilityOptions {
|
|
|
|
boolean checkOpacity = false;
|
|
|
|
boolean checkVisibilityCSS = false;
|
|
|
|
boolean contentVisibilityAuto = false;
|
|
|
|
boolean opacityProperty = false;
|
|
|
|
boolean visibilityProperty = false;
|
|
|
|
};
|
|
|
|
|
2022-07-27 21:14:16 +01:00
|
|
|
// https://dom.spec.whatwg.org/#element
|
2023-10-06 07:43:52 +13:00
|
|
|
[Exposed=Window]
|
2020-06-21 11:39:32 +02:00
|
|
|
interface Element : Node {
|
2020-10-10 02:48:05 +01:00
|
|
|
readonly attribute DOMString? namespaceURI;
|
2023-10-06 07:43:52 +13:00
|
|
|
readonly attribute DOMString? prefix;
|
|
|
|
readonly attribute DOMString localName;
|
|
|
|
readonly attribute DOMString tagName;
|
2020-06-21 12:01:13 +02:00
|
|
|
|
2024-04-14 14:27:39 +02:00
|
|
|
[Reflect, CEReactions] attribute DOMString id;
|
|
|
|
[Reflect=class, CEReactions] attribute DOMString className;
|
|
|
|
[SameObject, PutForwards=value] readonly attribute DOMTokenList classList;
|
|
|
|
[Reflect, CEReactions, Unscopable] attribute DOMString slot;
|
|
|
|
|
|
|
|
boolean hasAttributes();
|
|
|
|
[SameObject] readonly attribute NamedNodeMap attributes;
|
|
|
|
sequence<DOMString> getAttributeNames();
|
2023-10-06 07:43:52 +13:00
|
|
|
DOMString? getAttribute(DOMString qualifiedName);
|
2024-01-13 17:31:46 +13:00
|
|
|
DOMString? getAttributeNS([FlyString] DOMString? namespace, [FlyString] DOMString localName);
|
2023-03-01 01:45:18 +00:00
|
|
|
[CEReactions] undefined setAttribute(DOMString qualifiedName, DOMString value);
|
2024-01-02 23:49:13 +13:00
|
|
|
[CEReactions] undefined setAttributeNS([FlyString] DOMString? namespace , [FlyString] DOMString qualifiedName , DOMString value);
|
2024-01-14 18:56:28 +13:00
|
|
|
[CEReactions] undefined removeAttribute([FlyString] DOMString qualifiedName);
|
|
|
|
[CEReactions] undefined removeAttributeNS([FlyString] DOMString? namespace, [FlyString] DOMString localName);
|
2022-03-30 16:50:44 +02:00
|
|
|
[CEReactions] boolean toggleAttribute(DOMString qualifiedName, optional boolean force);
|
2020-12-29 20:37:40 +00:00
|
|
|
boolean hasAttribute(DOMString qualifiedName);
|
2024-01-02 23:49:13 +13:00
|
|
|
boolean hasAttributeNS([FlyString] DOMString? namespace, [FlyString] DOMString localName);
|
2020-06-21 11:39:32 +02:00
|
|
|
|
2024-01-14 18:04:18 +13:00
|
|
|
Attr? getAttributeNode([FlyString] DOMString qualifiedName);
|
|
|
|
Attr? getAttributeNodeNS([FlyString] DOMString? namespace, [FlyString] DOMString localName);
|
2024-04-14 14:27:39 +02:00
|
|
|
[CEReactions] Attr? setAttributeNode(Attr attr);
|
|
|
|
[CEReactions] Attr? setAttributeNodeNS(Attr attr);
|
2024-04-14 15:49:48 +02:00
|
|
|
[CEReactions] Attr removeAttributeNode(Attr attr);
|
2020-08-03 20:32:06 +02:00
|
|
|
|
2023-01-28 20:37:46 +01:00
|
|
|
ShadowRoot attachShadow(ShadowRootInit init);
|
2024-06-25 11:28:58 +02:00
|
|
|
[ImplementedAs=shadow_root_for_bindings] readonly attribute ShadowRoot? shadowRoot;
|
2023-01-28 20:37:46 +01:00
|
|
|
|
2021-09-30 02:16:36 +02:00
|
|
|
boolean matches(DOMString selectors);
|
2022-02-15 20:41:51 +01:00
|
|
|
Element? closest(DOMString selectors);
|
2024-04-14 14:27:39 +02:00
|
|
|
[ImplementedAs=matches] boolean webkitMatchesSelector(DOMString selectors); // legacy alias of .matches
|
|
|
|
|
2024-05-12 14:50:45 +12:00
|
|
|
HTMLCollection getElementsByTagName([FlyString] DOMString tagName);
|
|
|
|
HTMLCollection getElementsByTagNameNS([FlyString] DOMString? namespace, [FlyString] DOMString localName);
|
2024-04-14 14:27:39 +02:00
|
|
|
HTMLCollection getElementsByClassName(DOMString className);
|
2021-09-30 02:16:36 +02:00
|
|
|
|
2024-04-14 14:27:39 +02:00
|
|
|
[CEReactions] Element? insertAdjacentElement(DOMString where, Element element); // legacy
|
2025-07-24 12:05:52 -04:00
|
|
|
undefined insertAdjacentText(DOMString where, Utf16DOMString data); // legacy
|
2021-10-28 19:40:14 +01:00
|
|
|
|
2024-04-14 14:27:39 +02:00
|
|
|
// https://dom.spec.whatwg.org/#interface-nondocumenttypechildnode
|
2020-08-03 20:32:06 +02:00
|
|
|
readonly attribute Element? nextElementSibling;
|
|
|
|
readonly attribute Element? previousElementSibling;
|
2021-03-13 22:39:55 +01:00
|
|
|
|
2024-04-14 14:27:39 +02:00
|
|
|
// https://drafts.csswg.org/cssom-view/#extension-to-the-element-interface
|
2025-03-21 19:38:12 -05:00
|
|
|
[ImplementedAs=get_client_rects_for_bindings] DOMRectList getClientRects();
|
|
|
|
[ImplementedAs=get_bounding_client_rect_for_bindings] DOMRect getBoundingClientRect();
|
2024-04-14 14:27:39 +02:00
|
|
|
|
2024-06-24 22:48:27 +02:00
|
|
|
boolean checkVisibility(optional CheckVisibilityOptions options = {});
|
2021-09-27 00:55:13 +02:00
|
|
|
|
2024-04-14 14:27:39 +02:00
|
|
|
undefined scrollIntoView(optional (boolean or ScrollIntoViewOptions) arg = {});
|
|
|
|
undefined scroll(optional ScrollToOptions options = {});
|
|
|
|
undefined scroll(unrestricted double x, unrestricted double y);
|
|
|
|
[ImplementedAs=scroll] undefined scrollTo(optional ScrollToOptions options = {});
|
|
|
|
[ImplementedAs=scroll] undefined scrollTo(unrestricted double x, unrestricted double y);
|
2024-04-14 17:31:37 +02:00
|
|
|
undefined scrollBy(optional ScrollToOptions options = {});
|
|
|
|
undefined scrollBy(unrestricted double x, unrestricted double y);
|
2022-11-05 15:10:13 +00:00
|
|
|
attribute unrestricted double scrollTop;
|
|
|
|
attribute unrestricted double scrollLeft;
|
|
|
|
readonly attribute long scrollWidth;
|
|
|
|
readonly attribute long scrollHeight;
|
2021-09-30 02:17:23 +02:00
|
|
|
readonly attribute long clientTop;
|
|
|
|
readonly attribute long clientLeft;
|
|
|
|
readonly attribute long clientWidth;
|
|
|
|
readonly attribute long clientHeight;
|
2024-04-14 16:18:21 +02:00
|
|
|
readonly attribute double currentCSSZoom;
|
2022-09-20 18:28:41 +02:00
|
|
|
|
2025-02-04 13:01:46 +01:00
|
|
|
// https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-parsing-and-serialization
|
2024-06-25 20:55:58 +01:00
|
|
|
// FIXME: [CEReactions] undefined setHTMLUnsafe((TrustedHTML or DOMString) html);
|
|
|
|
[CEReactions] undefined setHTMLUnsafe(DOMString html);
|
2024-06-25 14:52:06 +02:00
|
|
|
DOMString getHTML(optional GetHTMLOptions options = {});
|
2024-06-25 14:21:21 +02:00
|
|
|
|
|
|
|
// FIXME: [CEReactions] attribute (TrustedHTML or [LegacyNullToEmptyString] DOMString) innerHTML;
|
|
|
|
[CEReactions, LegacyNullToEmptyString] attribute DOMString innerHTML;
|
|
|
|
|
|
|
|
// FIXME: [CEReactions] attribute (TrustedHTML or [LegacyNullToEmptyString] DOMString) outerHTML;
|
2024-04-09 14:44:58 +02:00
|
|
|
[CEReactions, LegacyNullToEmptyString] attribute DOMString outerHTML;
|
2024-06-25 14:21:21 +02:00
|
|
|
|
|
|
|
// FIXME: [CEReactions] undefined insertAdjacentHTML(DOMString position, (TrustedHTML or DOMString) string);
|
2024-04-14 14:27:39 +02:00
|
|
|
[CEReactions] undefined insertAdjacentHTML(DOMString position, DOMString text);
|
2023-06-07 17:11:01 +02:00
|
|
|
|
2025-04-11 17:49:12 +01:00
|
|
|
// https://w3c.github.io/pointerevents/#extensions-to-the-element-interface
|
2025-04-14 10:10:36 +01:00
|
|
|
undefined setPointerCapture(long pointerId);
|
|
|
|
undefined releasePointerCapture(long pointerId);
|
|
|
|
boolean hasPointerCapture(long pointerId);
|
2020-12-09 21:26:42 +00:00
|
|
|
};
|
2022-07-30 11:31:17 +01:00
|
|
|
|
2024-06-25 14:21:21 +02:00
|
|
|
dictionary GetHTMLOptions {
|
|
|
|
boolean serializableShadowRoots = false;
|
|
|
|
sequence<ShadowRoot> shadowRoots = [];
|
|
|
|
};
|
|
|
|
|
2023-01-28 20:37:46 +01:00
|
|
|
dictionary ShadowRootInit {
|
|
|
|
required ShadowRootMode mode;
|
|
|
|
boolean delegatesFocus = false;
|
2023-09-01 07:25:40 -04:00
|
|
|
SlotAssignmentMode slotAssignment = "named";
|
2024-06-25 09:42:51 +02:00
|
|
|
boolean clonable = false;
|
|
|
|
boolean serializable = false;
|
2023-01-28 20:37:46 +01:00
|
|
|
};
|
|
|
|
|
2022-07-30 11:31:17 +01:00
|
|
|
Element includes ParentNode;
|
|
|
|
Element includes ChildNode;
|
2022-11-28 17:58:13 -06:00
|
|
|
// https://www.w3.org/TR/wai-aria-1.2/#idl_element
|
|
|
|
Element includes ARIAMixin;
|
2023-09-05 13:07:35 -04:00
|
|
|
Element includes Slottable;
|
2024-02-03 12:10:21 -07:00
|
|
|
// https://www.w3.org/TR/web-animations-1/#extensions-to-the-element-interface
|
|
|
|
Element includes Animatable;
|