2022-07-27 21:14:16 +01:00
|
|
|
#import <CSS/CSSStyleDeclaration.idl>
|
|
|
|
#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>
|
2022-02-15 22:40:51 +03:30
|
|
|
#import <Geometry/DOMRect.idl>
|
|
|
|
#import <Geometry/DOMRectList.idl>
|
|
|
|
|
2022-10-04 19:52:25 +02:00
|
|
|
enum ScrollBehavior { "auto", "smooth" };
|
|
|
|
dictionary ScrollOptions {
|
|
|
|
ScrollBehavior behavior = "auto";
|
|
|
|
};
|
|
|
|
|
|
|
|
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
|
2020-06-21 11:39:32 +02:00
|
|
|
interface Element : Node {
|
2020-10-10 02:48:05 +01:00
|
|
|
readonly attribute DOMString? namespaceURI;
|
2021-05-11 15:16:08 +01:00
|
|
|
readonly attribute DOMString? prefix;
|
|
|
|
readonly attribute DOMString localName;
|
2020-06-21 12:01:13 +02:00
|
|
|
readonly attribute DOMString tagName;
|
|
|
|
|
2020-06-21 11:39:32 +02:00
|
|
|
DOMString? getAttribute(DOMString qualifiedName);
|
2020-12-09 21:32:04 +00:00
|
|
|
undefined setAttribute(DOMString qualifiedName, DOMString value);
|
2022-02-05 18:21:49 +01:00
|
|
|
[CEReactions] undefined setAttributeNS(DOMString? namespace , DOMString qualifiedName , DOMString value);
|
2020-12-29 20:37:40 +00:00
|
|
|
undefined removeAttribute(DOMString qualifiedName);
|
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);
|
|
|
|
boolean hasAttributes();
|
2021-10-16 17:00:49 -04:00
|
|
|
[SameObject] readonly attribute NamedNodeMap attributes;
|
2021-12-29 13:02:21 +00:00
|
|
|
sequence<DOMString> getAttributeNames();
|
2020-06-21 11:39:32 +02:00
|
|
|
|
2021-04-22 21:11:20 +02:00
|
|
|
HTMLCollection getElementsByTagName(DOMString tagName);
|
2021-09-22 18:06:19 +01:00
|
|
|
HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);
|
2021-04-22 21:11:20 +02:00
|
|
|
HTMLCollection getElementsByClassName(DOMString className);
|
2021-02-07 23:44:01 +01:00
|
|
|
|
2020-07-24 13:25:42 +02:00
|
|
|
[Reflect] attribute DOMString id;
|
|
|
|
[Reflect=class] attribute DOMString className;
|
2021-10-18 13:21:23 -04:00
|
|
|
[SameObject, PutForwards=value] readonly attribute DOMTokenList classList;
|
2020-08-03 20:32:06 +02: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);
|
2021-09-30 02:16:36 +02:00
|
|
|
|
2021-10-28 19:40:14 +01:00
|
|
|
// legacy alias of .matches
|
|
|
|
[ImplementedAs=matches] boolean webkitMatchesSelector(DOMString selectors);
|
|
|
|
|
2020-08-03 20:32:06 +02:00
|
|
|
readonly attribute Element? nextElementSibling;
|
|
|
|
readonly attribute Element? previousElementSibling;
|
2021-03-13 22:39:55 +01:00
|
|
|
|
|
|
|
[ImplementedAs=style_for_bindings] readonly attribute CSSStyleDeclaration style;
|
2021-04-11 17:13:10 +01:00
|
|
|
|
2021-09-27 00:55:13 +02:00
|
|
|
DOMRect getBoundingClientRect();
|
2022-02-12 16:48:00 +03:00
|
|
|
DOMRectList getClientRects();
|
2021-09-27 00:55:13 +02:00
|
|
|
|
2021-09-30 02:17:23 +02:00
|
|
|
readonly attribute long clientTop;
|
|
|
|
readonly attribute long clientLeft;
|
|
|
|
readonly attribute long clientWidth;
|
|
|
|
readonly attribute long clientHeight;
|
2022-09-20 18:28:41 +02:00
|
|
|
|
2022-10-01 00:30:15 +01:00
|
|
|
[CEReactions] Element? insertAdjacentElement(DOMString where, Element element);
|
2022-10-01 00:30:38 +01:00
|
|
|
undefined insertAdjacentText(DOMString where, DOMString data);
|
2022-09-20 18:28:41 +02:00
|
|
|
[CEReactions] undefined insertAdjacentHTML(DOMString position, DOMString text);
|
2022-10-04 19:52:25 +02:00
|
|
|
|
|
|
|
undefined scrollIntoView(optional (boolean or ScrollIntoViewOptions) arg = {});
|
|
|
|
|
2020-12-09 21:26:42 +00:00
|
|
|
};
|
2022-07-30 11:31:17 +01:00
|
|
|
|
|
|
|
Element includes ParentNode;
|
|
|
|
Element includes ChildNode;
|
|
|
|
Element includes InnerHTML;
|