diff options
-rw-r--r-- | Userland/Libraries/LibWeb/DOM/Element.idl | 4 | ||||
-rw-r--r-- | Userland/Libraries/LibWeb/DOM/InnerHTML.idl | 7 | ||||
-rw-r--r-- | Userland/Libraries/LibWeb/DOM/ShadowRoot.idl | 14 |
3 files changed, 17 insertions, 8 deletions
diff --git a/Userland/Libraries/LibWeb/DOM/Element.idl b/Userland/Libraries/LibWeb/DOM/Element.idl index e2d461d8bb..0baea125da 100644 --- a/Userland/Libraries/LibWeb/DOM/Element.idl +++ b/Userland/Libraries/LibWeb/DOM/Element.idl @@ -1,6 +1,7 @@ #import <CSS/CSSStyleDeclaration.idl> #import <DOM/ChildNode.idl> #import <DOM/DOMTokenList.idl> +#import <DOM/InnerHTML.idl> #import <DOM/NamedNodeMap.idl> #import <DOM/Node.idl> #import <DOM/NodeList.idl> @@ -29,9 +30,6 @@ interface Element : Node { 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; diff --git a/Userland/Libraries/LibWeb/DOM/InnerHTML.idl b/Userland/Libraries/LibWeb/DOM/InnerHTML.idl new file mode 100644 index 0000000000..5fce4cd4f5 --- /dev/null +++ b/Userland/Libraries/LibWeb/DOM/InnerHTML.idl @@ -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; diff --git a/Userland/Libraries/LibWeb/DOM/ShadowRoot.idl b/Userland/Libraries/LibWeb/DOM/ShadowRoot.idl index 769bf4b3ac..d1efd129d0 100644 --- a/Userland/Libraries/LibWeb/DOM/ShadowRoot.idl +++ b/Userland/Libraries/LibWeb/DOM/ShadowRoot.idl @@ -1,11 +1,15 @@ #import <DOM/DocumentFragment.idl> +#import <DOM/InnerHTML.idl> +// https://dom.spec.whatwg.org/#shadowroot interface ShadowRoot : DocumentFragment { - + // FIXME: mode should return a ShadowRootMode readonly attribute DOMString mode; + // FIXME: readonly attribute boolean delegatesFocus; + // FIXME: readonly attribute SlotAssignmentMode slotAssignment; readonly attribute Element host; - - // FIXME: This should come from a InnerHTML mixin. - [LegacyNullToEmptyString] attribute DOMString innerHTML; - + // FIXME: attribute EventHandler onslotchange; }; + +enum ShadowRootMode { "open", "closed" }; +enum SlotAssignmentMode { "manual", "named" }; |