1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:27:46 +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

@ -11,6 +11,7 @@
#import <DOM/NodeFilter.idl>
#import <DOM/NodeIterator.idl>
#import <DOM/NodeList.idl>
#import <DOM/ParentNode.idl>
#import <DOM/Range.idl>
#import <DOM/Text.idl>
#import <DOM/TreeWalker.idl>
@ -18,8 +19,8 @@
#import <HTML/HTMLHeadElement.idl>
#import <HTML/HTMLScriptElement.idl>
// https://dom.spec.whatwg.org/#document
interface Document : Node {
constructor();
boolean hasFocus();
@ -92,26 +93,11 @@ interface Document : Node {
attribute DOMString title;
// FIXME: These should all come from a ParentNode mixin
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);
[SameObject] readonly attribute HTMLCollection children;
readonly boolean hidden;
readonly DOMString visibilityState;
[NewObject] NodeIterator createNodeIterator(Node root, optional unsigned long whatToShow = 0xFFFFFFFF, optional NodeFilter? filter = null);
[NewObject] TreeWalker createTreeWalker(Node root, optional unsigned long whatToShow = 0xFFFFFFFF, optional NodeFilter? filter = null);
};
Document includes GlobalEventHandlers;