summaryrefslogtreecommitdiffstats
path: root/dom/webidl
diff options
context:
space:
mode:
Diffstat (limited to 'dom/webidl')
-rw-r--r--dom/webidl/AbortController.webidl13
-rw-r--r--dom/webidl/AbortSignal.webidl13
-rw-r--r--dom/webidl/Document.webidl4
-rw-r--r--dom/webidl/DocumentOrShadowRoot.webidl29
-rw-r--r--dom/webidl/FetchObserver.webidl27
-rw-r--r--dom/webidl/Request.webidl6
-rw-r--r--dom/webidl/ShadowRoot.webidl1
-rw-r--r--dom/webidl/moz.build12
8 files changed, 97 insertions, 8 deletions
diff --git a/dom/webidl/AbortController.webidl b/dom/webidl/AbortController.webidl
new file mode 100644
index 000000000..4e9124075
--- /dev/null
+++ b/dom/webidl/AbortController.webidl
@@ -0,0 +1,13 @@
+/* -*- 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/.
+ */
+
+[Constructor(), Exposed=(Window,Worker),
+ Func="AbortController::IsEnabled"]
+interface AbortController {
+ readonly attribute AbortSignal signal;
+
+ void abort();
+};
diff --git a/dom/webidl/AbortSignal.webidl b/dom/webidl/AbortSignal.webidl
new file mode 100644
index 000000000..b4b03bb7e
--- /dev/null
+++ b/dom/webidl/AbortSignal.webidl
@@ -0,0 +1,13 @@
+/* -*- 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/.
+ */
+
+[Exposed=(Window,Worker),
+ Func="AbortController::IsEnabled"]
+interface AbortSignal : EventTarget {
+ readonly attribute boolean aborted;
+
+ attribute EventHandler onabort;
+};
diff --git a/dom/webidl/Document.webidl b/dom/webidl/Document.webidl
index ba2ec17ea..26985202b 100644
--- a/dom/webidl/Document.webidl
+++ b/dom/webidl/Document.webidl
@@ -136,7 +136,6 @@ partial interface Document {
// user interaction
[Pure]
readonly attribute WindowProxy? defaultView;
- readonly attribute Element? activeElement;
[Throws]
boolean hasFocus();
//(HTML only) attribute DOMString designMode;
@@ -283,8 +282,6 @@ partial interface Document {
// http://dev.w3.org/csswg/cssom/#extensions-to-the-document-interface
partial interface Document {
- [Constant]
- readonly attribute StyleSheetList styleSheets;
attribute DOMString? selectedStyleSheetSet;
readonly attribute DOMString? lastStyleSheetSet;
readonly attribute DOMString? preferredStyleSheetSet;
@@ -456,3 +453,4 @@ Document implements ParentNode;
Document implements OnErrorEventHandlerForNodes;
Document implements GeometryUtils;
Document implements FontFaceSource;
+Document implements DocumentOrShadowRoot;
diff --git a/dom/webidl/DocumentOrShadowRoot.webidl b/dom/webidl/DocumentOrShadowRoot.webidl
new file mode 100644
index 000000000..16388d126
--- /dev/null
+++ b/dom/webidl/DocumentOrShadowRoot.webidl
@@ -0,0 +1,29 @@
+/* -*- 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://dom.spec.whatwg.org/#documentorshadowroot
+ * http://w3c.github.io/webcomponents/spec/shadow/#extensions-to-the-documentorshadowroot-mixin
+ */
+
+[NoInterfaceObject]
+interface DocumentOrShadowRoot {
+ // Not implemented yet: bug 1430308.
+ // Selection? getSelection();
+ // Not implemented yet: bug 1430301.
+ // Element? elementFromPoint (float x, float y);
+ // Not implemented yet: bug 1430301.
+ // sequence<Element> elementsFromPoint (float x, float y);
+ // Not implemented yet: bug 1430307.
+ // CaretPosition? caretPositionFromPoint (float x, float y);
+
+ readonly attribute Element? activeElement;
+ readonly attribute StyleSheetList styleSheets;
+
+ // Not implemented yet: bug 1430303.
+ // readonly attribute Element? pointerLockElement;
+ // Not implemented yet: bug 1430305.
+ // readonly attribute Element? fullscreenElement;
+};
diff --git a/dom/webidl/FetchObserver.webidl b/dom/webidl/FetchObserver.webidl
new file mode 100644
index 000000000..eecd67e66
--- /dev/null
+++ b/dom/webidl/FetchObserver.webidl
@@ -0,0 +1,27 @@
+/* -*- 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/.
+ */
+
+callback interface ObserverCallback {
+ void handleEvent(FetchObserver observer);
+};
+
+enum FetchState {
+ // Pending states
+ "requesting", "responding",
+ // Final states
+ "aborted", "errored", "complete"
+};
+
+[Exposed=(Window,Worker),
+ Func="FetchObserver::IsEnabled"]
+interface FetchObserver : EventTarget {
+ readonly attribute FetchState state;
+
+ // Events
+ attribute EventHandler onstatechange;
+ attribute EventHandler onrequestprogress;
+ attribute EventHandler onresponseprogress;
+};
diff --git a/dom/webidl/Request.webidl b/dom/webidl/Request.webidl
index e29c084d0..fe6a63ec0 100644
--- a/dom/webidl/Request.webidl
+++ b/dom/webidl/Request.webidl
@@ -47,6 +47,12 @@ dictionary RequestInit {
RequestCache cache;
RequestRedirect redirect;
DOMString integrity;
+
+ [Func="AbortController::IsEnabled"]
+ AbortSignal signal;
+
+ [Func="FetchObserver::IsEnabled"]
+ ObserverCallback observe;
};
// Gecko currently does not ship RequestContext, so please don't use it in IDL
diff --git a/dom/webidl/ShadowRoot.webidl b/dom/webidl/ShadowRoot.webidl
index 47e6cf5ec..83acd4161 100644
--- a/dom/webidl/ShadowRoot.webidl
+++ b/dom/webidl/ShadowRoot.webidl
@@ -32,6 +32,5 @@ interface ShadowRoot : DocumentFragment
[CEReactions, SetterThrows, TreatNullAs=EmptyString]
attribute DOMString innerHTML;
attribute boolean applyAuthorStyles;
- readonly attribute StyleSheetList styleSheets;
};
diff --git a/dom/webidl/moz.build b/dom/webidl/moz.build
index 45bf92a97..acdc392be 100644
--- a/dom/webidl/moz.build
+++ b/dom/webidl/moz.build
@@ -17,6 +17,8 @@ PREPROCESSED_WEBIDL_FILES = [
]
WEBIDL_FILES = [
+ 'AbortController.webidl',
+ 'AbortSignal.webidl',
'AbstractWorker.webidl',
'AnalyserNode.webidl',
'Animatable.webidl',
@@ -111,6 +113,7 @@ WEBIDL_FILES = [
'Directory.webidl',
'Document.webidl',
'DocumentFragment.webidl',
+ 'DocumentOrShadowRoot.webidl',
'DocumentTimeline.webidl',
'DocumentType.webidl',
'DOMCursor.webidl',
@@ -142,6 +145,7 @@ WEBIDL_FILES = [
'FakePluginTagInit.webidl',
'Fetch.webidl',
'FetchEvent.webidl',
+ 'FetchObserver.webidl',
'File.webidl',
'FileList.webidl',
'FileMode.webidl',
@@ -647,10 +651,10 @@ WEBIDL_FILES += [
# We only expose our prefable test interfaces in debug builds, just to be on
# the safe side.
if CONFIG['MOZ_DEBUG']:
- WEBIDL_FILES += ['TestFunctions.webidl',
- 'TestInterfaceJS.webidl',
- 'TestInterfaceJSDictionaries.webidl',
- 'TestInterfaceJSMaplikeSetlikeIterable.webidl']
+ WEBIDL_FILES += [
+ 'TestInterfaceJS.webidl',
+ 'TestInterfaceJSDictionaries.webidl',
+ ]
if CONFIG['MOZ_SECUREELEMENT']:
WEBIDL_FILES += [