1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:17:36 +00:00

LibWeb: Extract the ParentNode IDL mixin

This commit is contained in:
Sam Atkins 2022-07-27 19:51:49 +01:00 committed by Linus Groh
parent 79fdc08de9
commit d4c40e3aad
4 changed files with 27 additions and 46 deletions

View file

@ -0,0 +1,22 @@
#import <DOM/Element.idl>
#import <DOM/HTMLCollection.idl>
#import <DOM/Node.idl>
// https://dom.spec.whatwg.org/#parentnode
interface mixin ParentNode {
[SameObject] readonly attribute HTMLCollection children;
readonly attribute Element? firstElementChild;
readonly attribute Element? lastElementChild;
readonly attribute unsigned long childElementCount;
[CEReactions, Unscopable] undefined prepend((Node or DOMString)... nodes);
[CEReactions, Unscopable] undefined append((Node or DOMString)... nodes);
[CEReactions, Unscopable] undefined replaceChildren((Node or DOMString)... nodes);
Element? querySelector(DOMString selectors);
[NewObject] NodeList querySelectorAll(DOMString selectors);
};
Document includes ParentNode;
DocumentFragment includes ParentNode;
Element includes ParentNode;