mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:37:44 +00:00
LibWeb: Extract the ChildNode IDL mixin
This commit is contained in:
parent
6db558e0ae
commit
d6a5ddd3c0
4 changed files with 20 additions and 24 deletions
|
@ -1,8 +1,9 @@
|
||||||
|
#import <DOM/ChildNode.idl>
|
||||||
#import <DOM/Element.idl>
|
#import <DOM/Element.idl>
|
||||||
#import <DOM/Node.idl>
|
#import <DOM/Node.idl>
|
||||||
|
|
||||||
|
// https://dom.spec.whatwg.org/#characterdata
|
||||||
interface CharacterData : Node {
|
interface CharacterData : Node {
|
||||||
|
|
||||||
[LegacyNullToEmptyString] attribute DOMString data;
|
[LegacyNullToEmptyString] attribute DOMString data;
|
||||||
readonly attribute unsigned long length;
|
readonly attribute unsigned long length;
|
||||||
|
|
||||||
|
@ -14,11 +15,4 @@ interface CharacterData : Node {
|
||||||
|
|
||||||
readonly attribute Element? nextElementSibling;
|
readonly attribute Element? nextElementSibling;
|
||||||
readonly attribute Element? previousElementSibling;
|
readonly attribute Element? previousElementSibling;
|
||||||
|
|
||||||
// FIXME: These should come from a ChildNode mixin
|
|
||||||
[CEReactions, Unscopable] undefined before((Node or DOMString)... nodes);
|
|
||||||
[CEReactions, Unscopable] undefined after((Node or DOMString)... nodes);
|
|
||||||
[CEReactions, Unscopable] undefined replaceWith((Node or DOMString)... nodes);
|
|
||||||
[CEReactions, Unscopable, ImplementedAs=remove_binding] undefined remove();
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
13
Userland/Libraries/LibWeb/DOM/ChildNode.idl
Normal file
13
Userland/Libraries/LibWeb/DOM/ChildNode.idl
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
#import <DOM/Node.idl>
|
||||||
|
|
||||||
|
// https://dom.spec.whatwg.org/#childnode
|
||||||
|
interface mixin ChildNode {
|
||||||
|
[CEReactions, Unscopable] undefined before((Node or DOMString)... nodes);
|
||||||
|
[CEReactions, Unscopable] undefined after((Node or DOMString)... nodes);
|
||||||
|
[CEReactions, Unscopable] undefined replaceWith((Node or DOMString)... nodes);
|
||||||
|
[CEReactions, Unscopable, ImplementedAs=remove_binding] undefined remove();
|
||||||
|
};
|
||||||
|
|
||||||
|
DocumentType includes ChildNode;
|
||||||
|
Element includes ChildNode;
|
||||||
|
CharacterData includes ChildNode;
|
|
@ -1,15 +1,9 @@
|
||||||
|
#import <DOM/ChildNode.idl>
|
||||||
#import <DOM/Node.idl>
|
#import <DOM/Node.idl>
|
||||||
|
|
||||||
|
// https://dom.spec.whatwg.org/#documenttype
|
||||||
interface DocumentType : Node {
|
interface DocumentType : Node {
|
||||||
|
|
||||||
readonly attribute DOMString name;
|
readonly attribute DOMString name;
|
||||||
readonly attribute DOMString publicId;
|
readonly attribute DOMString publicId;
|
||||||
readonly attribute DOMString systemId;
|
readonly attribute DOMString systemId;
|
||||||
|
|
||||||
// FIXME: These should come from a ChildNode mixin
|
|
||||||
[CEReactions, Unscopable] undefined before((Node or DOMString)... nodes);
|
|
||||||
[CEReactions, Unscopable] undefined after((Node or DOMString)... nodes);
|
|
||||||
[CEReactions, Unscopable] undefined replaceWith((Node or DOMString)... nodes);
|
|
||||||
[CEReactions, Unscopable, ImplementedAs=remove_binding] undefined remove();
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
|
#import <CSS/CSSStyleDeclaration.idl>
|
||||||
|
#import <DOM/ChildNode.idl>
|
||||||
#import <DOM/DOMTokenList.idl>
|
#import <DOM/DOMTokenList.idl>
|
||||||
#import <DOM/NamedNodeMap.idl>
|
#import <DOM/NamedNodeMap.idl>
|
||||||
#import <DOM/Node.idl>
|
#import <DOM/Node.idl>
|
||||||
#import <DOM/NodeList.idl>
|
#import <DOM/NodeList.idl>
|
||||||
#import <Geometry/DOMRect.idl>
|
#import <Geometry/DOMRect.idl>
|
||||||
#import <Geometry/DOMRectList.idl>
|
#import <Geometry/DOMRectList.idl>
|
||||||
#import <CSS/CSSStyleDeclaration.idl>
|
|
||||||
|
|
||||||
|
// https://dom.spec.whatwg.org/#element
|
||||||
interface Element : Node {
|
interface Element : Node {
|
||||||
readonly attribute DOMString? namespaceURI;
|
readonly attribute DOMString? namespaceURI;
|
||||||
readonly attribute DOMString? prefix;
|
readonly attribute DOMString? prefix;
|
||||||
|
@ -65,11 +67,4 @@ interface Element : Node {
|
||||||
readonly attribute long clientLeft;
|
readonly attribute long clientLeft;
|
||||||
readonly attribute long clientWidth;
|
readonly attribute long clientWidth;
|
||||||
readonly attribute long clientHeight;
|
readonly attribute long clientHeight;
|
||||||
|
|
||||||
// FIXME: These should come from a ChildNode mixin
|
|
||||||
[CEReactions, Unscopable] undefined before((Node or DOMString)... nodes);
|
|
||||||
[CEReactions, Unscopable] undefined after((Node or DOMString)... nodes);
|
|
||||||
[CEReactions, Unscopable] undefined replaceWith((Node or DOMString)... nodes);
|
|
||||||
[CEReactions, Unscopable, ImplementedAs=remove_binding] undefined remove();
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue