mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 10:17:35 +00:00
LibWeb: Extract the InnerHTML IDL mixin
This commit is contained in:
parent
b456adcb59
commit
200e111af0
3 changed files with 17 additions and 8 deletions
|
@ -1,6 +1,7 @@
|
||||||
#import <CSS/CSSStyleDeclaration.idl>
|
#import <CSS/CSSStyleDeclaration.idl>
|
||||||
#import <DOM/ChildNode.idl>
|
#import <DOM/ChildNode.idl>
|
||||||
#import <DOM/DOMTokenList.idl>
|
#import <DOM/DOMTokenList.idl>
|
||||||
|
#import <DOM/InnerHTML.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>
|
||||||
|
@ -29,9 +30,6 @@ interface Element : Node {
|
||||||
HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);
|
HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);
|
||||||
HTMLCollection getElementsByClassName(DOMString className);
|
HTMLCollection getElementsByClassName(DOMString className);
|
||||||
|
|
||||||
// FIXME: This should come from a InnerHTML mixin.
|
|
||||||
[LegacyNullToEmptyString, CEReactions] attribute DOMString innerHTML;
|
|
||||||
|
|
||||||
[Reflect] attribute DOMString id;
|
[Reflect] attribute DOMString id;
|
||||||
[Reflect=class] attribute DOMString className;
|
[Reflect=class] attribute DOMString className;
|
||||||
[SameObject, PutForwards=value] readonly attribute DOMTokenList classList;
|
[SameObject, PutForwards=value] readonly attribute DOMTokenList classList;
|
||||||
|
|
7
Userland/Libraries/LibWeb/DOM/InnerHTML.idl
Normal file
7
Userland/Libraries/LibWeb/DOM/InnerHTML.idl
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
// https://w3c.github.io/DOM-Parsing/#the-innerhtml-mixin
|
||||||
|
interface mixin InnerHTML {
|
||||||
|
[LegacyNullToEmptyString, CEReactions] attribute DOMString innerHTML;
|
||||||
|
};
|
||||||
|
|
||||||
|
Element includes InnerHTML;
|
||||||
|
ShadowRoot includes InnerHTML;
|
|
@ -1,11 +1,15 @@
|
||||||
#import <DOM/DocumentFragment.idl>
|
#import <DOM/DocumentFragment.idl>
|
||||||
|
#import <DOM/InnerHTML.idl>
|
||||||
|
|
||||||
|
// https://dom.spec.whatwg.org/#shadowroot
|
||||||
interface ShadowRoot : DocumentFragment {
|
interface ShadowRoot : DocumentFragment {
|
||||||
|
// FIXME: mode should return a ShadowRootMode
|
||||||
readonly attribute DOMString mode;
|
readonly attribute DOMString mode;
|
||||||
|
// FIXME: readonly attribute boolean delegatesFocus;
|
||||||
|
// FIXME: readonly attribute SlotAssignmentMode slotAssignment;
|
||||||
readonly attribute Element host;
|
readonly attribute Element host;
|
||||||
|
// FIXME: attribute EventHandler onslotchange;
|
||||||
// FIXME: This should come from a InnerHTML mixin.
|
|
||||||
[LegacyNullToEmptyString] attribute DOMString innerHTML;
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum ShadowRootMode { "open", "closed" };
|
||||||
|
enum SlotAssignmentMode { "manual", "named" };
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue