summaryrefslogtreecommitdiffstats
path: root/dom/webidl
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-07-10 18:46:10 +0000
committerMoonchild <moonchild@palemoon.org>2020-07-10 18:46:10 +0000
commitf1b51be787c11090c8d9b2ec73255df7a67c7eb7 (patch)
tree9c6d35ce6f19e0fef3c47c7e2c152394854cf217 /dom/webidl
parent2deaddfca28508ac1a634eb6088a1da8e571ec6e (diff)
parent82faff19e1761797b7a75f9221f0709c5a38bfe6 (diff)
downloadUXP-f1b51be787c11090c8d9b2ec73255df7a67c7eb7.tar
UXP-f1b51be787c11090c8d9b2ec73255df7a67c7eb7.tar.gz
UXP-f1b51be787c11090c8d9b2ec73255df7a67c7eb7.tar.lz
UXP-f1b51be787c11090c8d9b2ec73255df7a67c7eb7.tar.xz
UXP-f1b51be787c11090c8d9b2ec73255df7a67c7eb7.zip
Merge branch 'redwood' into releaseRELBASE_20200711
Diffstat (limited to 'dom/webidl')
-rw-r--r--dom/webidl/AbortController.webidl13
-rw-r--r--dom/webidl/AbortSignal.webidl13
-rw-r--r--dom/webidl/FetchObserver.webidl27
-rw-r--r--dom/webidl/Node.webidl9
-rw-r--r--dom/webidl/Request.webidl6
-rw-r--r--dom/webidl/moz.build3
6 files changed, 69 insertions, 2 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/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/Node.webidl b/dom/webidl/Node.webidl
index 7d18899b0..0a14e3624 100644
--- a/dom/webidl/Node.webidl
+++ b/dom/webidl/Node.webidl
@@ -38,8 +38,8 @@ interface Node : EventTarget {
readonly attribute boolean isConnected;
[Pure]
readonly attribute Document? ownerDocument;
- [Pure, Pref="dom.node.rootNode.enabled"]
- readonly attribute Node rootNode;
+ [Pure]
+ Node getRootNode(optional GetRootNodeOptions options);
[Pure]
readonly attribute Node? parentNode;
[Pure]
@@ -113,3 +113,8 @@ interface Node : EventTarget {
readonly attribute AccessibleNode? accessibleNode;
#endif
};
+
+dictionary GetRootNodeOptions {
+ boolean composed = false;
+};
+
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/moz.build b/dom/webidl/moz.build
index 5e913585e..d8309c265 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',
@@ -142,6 +144,7 @@ WEBIDL_FILES = [
'FakePluginTagInit.webidl',
'Fetch.webidl',
'FetchEvent.webidl',
+ 'FetchObserver.webidl',
'File.webidl',
'FileList.webidl',
'FileMode.webidl',