summaryrefslogtreecommitdiffstats
path: root/dom/webidl
diff options
context:
space:
mode:
Diffstat (limited to 'dom/webidl')
-rw-r--r--dom/webidl/AnonymousContent.webidl8
-rw-r--r--dom/webidl/Document.webidl10
-rw-r--r--dom/webidl/Element.webidl24
-rw-r--r--dom/webidl/Event.webidl2
-rw-r--r--dom/webidl/HTMLShadowElement.webidl19
-rw-r--r--dom/webidl/HTMLSlotElement.webidl (renamed from dom/webidl/HTMLContentElement.webidl)14
-rw-r--r--dom/webidl/ShadowRoot.webidl14
-rw-r--r--dom/webidl/Text.webidl5
-rw-r--r--dom/webidl/WebComponents.webidl5
-rw-r--r--dom/webidl/moz.build3
10 files changed, 57 insertions, 47 deletions
diff --git a/dom/webidl/AnonymousContent.webidl b/dom/webidl/AnonymousContent.webidl
index 6755fe598..8be69cd26 100644
--- a/dom/webidl/AnonymousContent.webidl
+++ b/dom/webidl/AnonymousContent.webidl
@@ -77,4 +77,12 @@ interface AnonymousContent {
[Throws]
void setCutoutRectsForElement(DOMString elementId,
sequence<DOMRect> rects);
+
+ /**
+ * Get the computed value of a property on an element inside this custom
+ * anonymous content.
+ */
+ [Throws]
+ DOMString? getComputedStylePropertyValue(DOMString elementId,
+ DOMString propertyName);
};
diff --git a/dom/webidl/Document.webidl b/dom/webidl/Document.webidl
index b28903ae2..ba2ec17ea 100644
--- a/dom/webidl/Document.webidl
+++ b/dom/webidl/Document.webidl
@@ -17,6 +17,9 @@ enum VisibilityState { "hidden", "visible", "prerender" };
/* https://dom.spec.whatwg.org/#dictdef-elementcreationoptions */
dictionary ElementCreationOptions {
DOMString is;
+
+ [ChromeOnly]
+ DOMString pseudo;
};
/* http://dom.spec.whatwg.org/#interface-document */
@@ -268,13 +271,6 @@ partial interface Document {
attribute EventHandler onpointerlockerror;
};
-//http://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/custom/index.html#dfn-document-register
-partial interface Document {
- // this is deprecated from CustomElements v0
- [Throws, Func="CustomElementRegistry::IsCustomElementEnabled"]
- object registerElement(DOMString name, optional ElementRegistrationOptions options);
-};
-
// https://w3c.github.io/page-visibility/#extensions-to-the-document-interface
partial interface Document {
[Pref="dom.visibilityAPI.enabled"]
diff --git a/dom/webidl/Element.webidl b/dom/webidl/Element.webidl
index a6b2bfdd5..d5cac7c64 100644
--- a/dom/webidl/Element.webidl
+++ b/dom/webidl/Element.webidl
@@ -228,14 +228,26 @@ 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();
- [Func="nsDocument::IsWebComponentsEnabled"]
+ // Shadow DOM v1
+ [Throws, Func="nsDocument::IsWebComponentsEnabled"]
+ ShadowRoot attachShadow(ShadowRootInit shadowRootInitDict);
+ [BinaryName="shadowRootByMode", Func="nsDocument::IsWebComponentsEnabled"]
readonly attribute ShadowRoot? shadowRoot;
+ [BinaryName="assignedSlotByMode", Func="nsDocument::IsWebComponentsEnabled"]
+ readonly attribute HTMLSlotElement? assignedSlot;
+ [CEReactions, Unscopable, SetterThrows, Func="nsDocument::IsWebComponentsEnabled"]
+ attribute DOMString slot;
+
+ // [deprecated] Shadow DOM v0
+ [Throws, Func="nsDocument::IsWebComponentsEnabled"]
+ ShadowRoot createShadowRoot();
};
Element implements ChildNode;
diff --git a/dom/webidl/Event.webidl b/dom/webidl/Event.webidl
index a5d7da7d4..8a8e71c43 100644
--- a/dom/webidl/Event.webidl
+++ b/dom/webidl/Event.webidl
@@ -22,6 +22,8 @@ interface Event {
[Pure]
readonly attribute EventTarget? currentTarget;
+ sequence<EventTarget> composedPath();
+
const unsigned short NONE = 0;
const unsigned short CAPTURING_PHASE = 1;
const unsigned short AT_TARGET = 2;
diff --git a/dom/webidl/HTMLShadowElement.webidl b/dom/webidl/HTMLShadowElement.webidl
deleted file mode 100644
index f72cd06e1..000000000
--- a/dom/webidl/HTMLShadowElement.webidl
+++ /dev/null
@@ -1,19 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html
- *
- * © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
- * Opera Software ASA. You are granted a license to use, reproduce
- * and create derivative works of this document.
- */
-
-[Func="nsDocument::IsWebComponentsEnabled"]
-interface HTMLShadowElement : HTMLElement
-{
- readonly attribute ShadowRoot? olderShadowRoot;
-};
-
diff --git a/dom/webidl/HTMLContentElement.webidl b/dom/webidl/HTMLSlotElement.webidl
index ea809f120..24dfcf350 100644
--- a/dom/webidl/HTMLContentElement.webidl
+++ b/dom/webidl/HTMLSlotElement.webidl
@@ -4,17 +4,19 @@
* You can obtain one at http://mozilla.org/MPL/2.0/.
*
* The origin of this IDL file is
- * https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html
+ * https://html.spec.whatwg.org/multipage/forms.html#the-dialog-element
*
* © Copyright 2004-2011 Apple Computer, Inc., Mozilla Foundation, and
* Opera Software ASA. You are granted a license to use, reproduce
* and create derivative works of this document.
*/
-[Func="nsDocument::IsWebComponentsEnabled"]
-interface HTMLContentElement : HTMLElement
-{
- attribute DOMString select;
- NodeList getDistributedNodes();
+[Func="nsDocument::IsWebComponentsEnabled", Exposed=Window, HTMLConstructor]
+interface HTMLSlotElement : HTMLElement {
+ [CEReactions, SetterThrows] attribute DOMString name;
+ sequence<Node> assignedNodes(optional AssignedNodesOptions options);
};
+dictionary AssignedNodesOptions {
+ boolean flatten = false;
+}; \ No newline at end of file
diff --git a/dom/webidl/ShadowRoot.webidl b/dom/webidl/ShadowRoot.webidl
index 8dd069244..47e6cf5ec 100644
--- a/dom/webidl/ShadowRoot.webidl
+++ b/dom/webidl/ShadowRoot.webidl
@@ -10,17 +10,27 @@
* liability, trademark and document use rules apply.
*/
+// https://dom.spec.whatwg.org/#enumdef-shadowrootmode
+enum ShadowRootMode {
+ "open",
+ "closed"
+};
+
+// https://dom.spec.whatwg.org/#shadowroot
[Func="nsDocument::IsWebComponentsEnabled"]
interface ShadowRoot : DocumentFragment
{
+ // Shadow DOM v1
+ readonly attribute ShadowRootMode mode;
+ readonly attribute Element host;
+
+ // [deprecated] Shadow DOM v0
Element? getElementById(DOMString elementId);
HTMLCollection getElementsByTagName(DOMString localName);
HTMLCollection getElementsByTagNameNS(DOMString? namespace, DOMString localName);
HTMLCollection getElementsByClassName(DOMString classNames);
[CEReactions, SetterThrows, TreatNullAs=EmptyString]
attribute DOMString innerHTML;
- readonly attribute Element host;
- readonly attribute ShadowRoot? olderShadowRoot;
attribute boolean applyAuthorStyles;
readonly attribute StyleSheetList styleSheets;
};
diff --git a/dom/webidl/Text.webidl b/dom/webidl/Text.webidl
index dcd25cec3..fb7b5d685 100644
--- a/dom/webidl/Text.webidl
+++ b/dom/webidl/Text.webidl
@@ -18,4 +18,9 @@ interface Text : CharacterData {
readonly attribute DOMString wholeText;
};
+partial interface Text {
+ [BinaryName="assignedSlotByMode", Func="nsTextNode::IsWebComponentsEnabled"]
+ readonly attribute HTMLSlotElement? assignedSlot;
+};
+
Text implements GeometryUtils;
diff --git a/dom/webidl/WebComponents.webidl b/dom/webidl/WebComponents.webidl
index f9bb8214a..9c5e53131 100644
--- a/dom/webidl/WebComponents.webidl
+++ b/dom/webidl/WebComponents.webidl
@@ -25,8 +25,3 @@ dictionary LifecycleCallbacks {
LifecycleAdoptedCallback? adoptedCallback;
LifecycleAttributeChangedCallback? attributeChangedCallback;
};
-
-dictionary ElementRegistrationOptions {
- object? prototype = null;
- DOMString? extends = null;
-};
diff --git a/dom/webidl/moz.build b/dom/webidl/moz.build
index 156da302d..d76a58e1f 100644
--- a/dom/webidl/moz.build
+++ b/dom/webidl/moz.build
@@ -177,7 +177,6 @@ WEBIDL_FILES = [
'HTMLButtonElement.webidl',
'HTMLCanvasElement.webidl',
'HTMLCollection.webidl',
- 'HTMLContentElement.webidl',
'HTMLDataElement.webidl',
'HTMLDataListElement.webidl',
'HTMLDetailsElement.webidl',
@@ -226,7 +225,7 @@ WEBIDL_FILES = [
'HTMLQuoteElement.webidl',
'HTMLScriptElement.webidl',
'HTMLSelectElement.webidl',
- 'HTMLShadowElement.webidl',
+ 'HTMLSlotElement.webidl',
'HTMLSourceElement.webidl',
'HTMLSpanElement.webidl',
'HTMLStyleElement.webidl',