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