summaryrefslogtreecommitdiffstats
path: root/dom/webidl/Element.webidl
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2020-04-17 07:04:42 -0400
committerMatt A. Tobin <email@mattatobin.com>2020-04-17 07:04:42 -0400
commit873abc7bcb6adc5cbf98ba3e1bd9a3271afc9806 (patch)
tree11bf691b4aed8b1a0834bdc7b7c1bc4eda739713 /dom/webidl/Element.webidl
parent96dfc63bc583454fb895c7a23f685995f5410388 (diff)
downloadUXP-873abc7bcb6adc5cbf98ba3e1bd9a3271afc9806.tar
UXP-873abc7bcb6adc5cbf98ba3e1bd9a3271afc9806.tar.gz
UXP-873abc7bcb6adc5cbf98ba3e1bd9a3271afc9806.tar.lz
UXP-873abc7bcb6adc5cbf98ba3e1bd9a3271afc9806.tar.xz
UXP-873abc7bcb6adc5cbf98ba3e1bd9a3271afc9806.zip
Bug 1404842 - Implement Element.attachShadow and Element.slot
Tag #1375
Diffstat (limited to 'dom/webidl/Element.webidl')
-rw-r--r--dom/webidl/Element.webidl22
1 files changed, 17 insertions, 5 deletions
diff --git a/dom/webidl/Element.webidl b/dom/webidl/Element.webidl
index 7fc59d614..ddc548442 100644
--- a/dom/webidl/Element.webidl
+++ b/dom/webidl/Element.webidl
@@ -228,16 +228,28 @@ partial interface Element {
NodeList querySelectorAll(DOMString selectors);
};
-// http://w3c.github.io/webcomponents/spec/shadow/#extensions-to-element-interface
+// https://dom.spec.whatwg.org/#dictdef-shadowrootinit
+dictionary ShadowRootInit {
+ required ShadowRootMode mode;
+};
+
+// https://dom.spec.whatwg.org/#element
partial interface Element {
- [Throws,Func="nsDocument::IsWebComponentsEnabled"]
- ShadowRoot createShadowRoot();
- [Func="nsDocument::IsWebComponentsEnabled"]
- NodeList getDestinationInsertionPoints();
+ // Shadow DOM v1
+ [Throws, Pref="nsDocument::IsWebComponentsEnabled"]
+ ShadowRoot attachShadow(ShadowRootInit shadowRootInitDict);
[Func="nsDocument::IsWebComponentsEnabled"]
readonly attribute ShadowRoot? shadowRoot;
[Pref="nsDocument::IsWebComponentsEnabled"]
readonly attribute HTMLSlotElement? assignedSlot;
+ [CEReactions, Unscopable, SetterThrows, Pref="nsDocument::IsWebComponentsEnabled"]
+ attribute DOMString slot;
+
+ // [deprecated] Shadow DOM v0
+ [Throws, Pref="nsDocument::IsWebComponentsEnabled"]
+ ShadowRoot createShadowRoot();
+ [Pref="nsDocument::IsWebComponentsEnabled"]
+ NodeList getDestinationInsertionPoints();
};
Element implements ChildNode;