2024-02-03 12:10:21 -07:00
|
|
|
#import <Animations/Animatable.idl>
|
2023-01-28 22:23:16 +00:00
|
|
|
#import <ARIA/ARIAMixin.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>
|
2022-07-27 20:42:20 +01:00
|
|
|
#import <DOM/InnerHTML.idl>
|
2022-02-15 22:40:51 +03:30
|
|
|
#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" };
|
|
|
|
dictionary ScrollIntoViewOptions : ScrollOptions {
|
|
|
|
ScrollLogicalPosition block = "start";
|
|
|
|
ScrollLogicalPosition inline = "nearest";
|
|
|
|
};
|
|
|
|
|
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);
|
|
|
|
// FIXME: [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);
|
|
|
|
readonly attribute ShadowRoot? shadowRoot;
|
|
|
|
|
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
|
|
|
|
|
|
|
|
HTMLCollection getElementsByTagName(DOMString tagName);
|
|
|
|
HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);
|
|
|
|
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
|
|
|
|
undefined insertAdjacentText(DOMString where, DOMString 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
|
2022-02-12 16:48:00 +03:00
|
|
|
DOMRectList getClientRects();
|
2024-04-14 14:27:39 +02:00
|
|
|
DOMRect getBoundingClientRect();
|
|
|
|
|
|
|
|
// FIXME: 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);
|
|
|
|
// FIXME: undefined scrollBy(optional ScrollToOptions options = {});
|
|
|
|
// FIXME: 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 14:27:39 +02:00
|
|
|
// FIXME: readonly attribute double currentCSSZoom;
|
2022-09-20 18:28:41 +02:00
|
|
|
|
2024-04-14 14:27:39 +02:00
|
|
|
// https://w3c.github.io/DOM-Parsing/#extensions-to-the-element-interface
|
2024-04-09 14:44:58 +02:00
|
|
|
[CEReactions, LegacyNullToEmptyString] attribute DOMString outerHTML;
|
2024-04-14 14:27:39 +02:00
|
|
|
[CEReactions] undefined insertAdjacentHTML(DOMString position, DOMString text);
|
2023-06-07 17:11:01 +02:00
|
|
|
|
2020-12-09 21:26:42 +00:00
|
|
|
};
|
2022-07-30 11:31:17 +01:00
|
|
|
|
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";
|
2023-01-28 20:37:46 +01:00
|
|
|
};
|
|
|
|
|
2022-07-30 11:31:17 +01:00
|
|
|
Element includes ParentNode;
|
|
|
|
Element includes ChildNode;
|
|
|
|
Element includes InnerHTML;
|
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;
|