1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-19 10:55:07 +00:00
serenity/Userland/Libraries/LibWeb/DOM/Element.idl
Luke Wilde 6088011c4b LibWeb: Add Element.webkitMatchesSelector
This is an alias of Element.matches for web compatibility.
https://dom.spec.whatwg.org/#dom-element-webkitmatchesselector

Used by particularly old versions of Sizzle, such as 1.10.2:
16b079b164/jquery.js (L1644)

This particular version is used by DuckDuckGo.
2021-10-28 21:43:36 +02:00

55 lines
2.1 KiB
Text

interface Element : Node {
readonly attribute DOMString? namespaceURI;
readonly attribute DOMString? prefix;
readonly attribute DOMString localName;
readonly attribute DOMString tagName;
DOMString? getAttribute(DOMString qualifiedName);
undefined setAttribute(DOMString qualifiedName, DOMString value);
undefined removeAttribute(DOMString qualifiedName);
boolean hasAttribute(DOMString qualifiedName);
boolean hasAttributes();
[SameObject] readonly attribute NamedNodeMap attributes;
HTMLCollection getElementsByTagName(DOMString tagName);
HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);
HTMLCollection getElementsByClassName(DOMString className);
// FIXME: This should come from a InnerHTML mixin.
[LegacyNullToEmptyString, CEReactions] attribute DOMString innerHTML;
[Reflect] attribute DOMString id;
[Reflect=class] attribute DOMString className;
[SameObject, PutForwards=value] readonly attribute DOMTokenList classList;
boolean matches(DOMString selectors);
// legacy alias of .matches
[ImplementedAs=matches] boolean webkitMatchesSelector(DOMString selectors);
readonly attribute Element? nextElementSibling;
readonly attribute Element? previousElementSibling;
[ImplementedAs=style_for_bindings] readonly attribute CSSStyleDeclaration style;
// FIXME: These should all come from a ParentNode mixin
readonly attribute Element? firstElementChild;
readonly attribute Element? lastElementChild;
readonly attribute unsigned long childElementCount;
Element? querySelector(DOMString selectors);
[NewObject] NodeList querySelectorAll(DOMString selectors);
[SameObject] readonly attribute HTMLCollection children;
DOMRect getBoundingClientRect();
readonly attribute long clientTop;
readonly attribute long clientLeft;
readonly attribute long clientWidth;
readonly attribute long clientHeight;
// FIXME: This should come from a ChildNode mixin
[CEReactions, Unscopable, ImplementedAs=remove_binding] undefined remove();
};