aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/webidls
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/webidls')
-rw-r--r--components/script/dom/webidls/Console.webidl2
-rw-r--r--components/script/dom/webidls/EventTarget.webidl2
-rw-r--r--components/script/dom/webidls/GlobalScope.webidl2
-rw-r--r--components/script/dom/webidls/TestWorklet.webidl12
-rw-r--r--components/script/dom/webidls/TestWorkletGlobalScope.webidl11
-rw-r--r--components/script/dom/webidls/VoidFunction.webidl13
-rw-r--r--components/script/dom/webidls/Window.webidl1
-rw-r--r--components/script/dom/webidls/Worklet.webidl13
-rw-r--r--components/script/dom/webidls/WorkletGlobalScope.webidl10
9 files changed, 63 insertions, 3 deletions
diff --git a/components/script/dom/webidls/Console.webidl b/components/script/dom/webidls/Console.webidl
index 90f9bb9f58e..7c4c6906a27 100644
--- a/components/script/dom/webidls/Console.webidl
+++ b/components/script/dom/webidls/Console.webidl
@@ -10,7 +10,7 @@
*/
[ClassString="Console",
- Exposed=(Window,Worker),
+ Exposed=(Window,Worker,Worklet),
ProtoObjectHack]
namespace console {
// These should be DOMString message, DOMString message2, ...
diff --git a/components/script/dom/webidls/EventTarget.webidl b/components/script/dom/webidls/EventTarget.webidl
index ee6e5d722a8..ad25712122a 100644
--- a/components/script/dom/webidls/EventTarget.webidl
+++ b/components/script/dom/webidls/EventTarget.webidl
@@ -5,7 +5,7 @@
* https://dom.spec.whatwg.org/#interface-eventtarget
*/
-[Abstract, Exposed=(Window,Worker)]
+[Abstract, Exposed=(Window,Worker,Worklet)]
interface EventTarget {
void addEventListener(DOMString type,
EventListener? listener,
diff --git a/components/script/dom/webidls/GlobalScope.webidl b/components/script/dom/webidls/GlobalScope.webidl
index 7dab4f3afa7..2681d236dbc 100644
--- a/components/script/dom/webidls/GlobalScope.webidl
+++ b/components/script/dom/webidls/GlobalScope.webidl
@@ -5,6 +5,6 @@
// This interface is entirely internal to Servo, and should not be accessible to
// web pages.
-[Exposed=(Window,Worker),
+[Exposed=(Window,Worker,Worklet),
Inline]
interface GlobalScope : EventTarget {};
diff --git a/components/script/dom/webidls/TestWorklet.webidl b/components/script/dom/webidls/TestWorklet.webidl
new file mode 100644
index 00000000000..c1f1965a1e0
--- /dev/null
+++ b/components/script/dom/webidls/TestWorklet.webidl
@@ -0,0 +1,12 @@
+/* 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/. */
+
+// This interface is entirely internal to Servo, and should not be accessible to
+// web pages.
+
+[Pref="dom.worklet.testing.enabled", Exposed=(Window), Constructor]
+interface TestWorklet {
+ [NewObject] Promise<void> addModule(USVString moduleURL, optional WorkletOptions options);
+ DOMString? lookup(DOMString key);
+};
diff --git a/components/script/dom/webidls/TestWorkletGlobalScope.webidl b/components/script/dom/webidls/TestWorkletGlobalScope.webidl
new file mode 100644
index 00000000000..44027ab8dc6
--- /dev/null
+++ b/components/script/dom/webidls/TestWorkletGlobalScope.webidl
@@ -0,0 +1,11 @@
+/* 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/. */
+
+// This interface is entirely internal to Servo, and should not be accessible to
+// web pages.
+
+[Global=(Worklet,TestWorklet), Exposed=TestWorklet]
+interface TestWorkletGlobalScope : WorkletGlobalScope {
+ void registerKeyValue(DOMString key, DOMString value);
+};
diff --git a/components/script/dom/webidls/VoidFunction.webidl b/components/script/dom/webidls/VoidFunction.webidl
new file mode 100644
index 00000000000..82d4a666c51
--- /dev/null
+++ b/components/script/dom/webidls/VoidFunction.webidl
@@ -0,0 +1,13 @@
+/* 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://heycam.github.io/webidl/#VoidFunction
+ *
+ * © 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.
+ */
+
+callback VoidFunction = void ();
diff --git a/components/script/dom/webidls/Window.webidl b/components/script/dom/webidls/Window.webidl
index 47c753f43b1..548821ac971 100644
--- a/components/script/dom/webidls/Window.webidl
+++ b/components/script/dom/webidls/Window.webidl
@@ -201,3 +201,4 @@ partial interface Window {
readonly attribute TestRunner testRunner;
//readonly attribute EventSender eventSender;
};
+
diff --git a/components/script/dom/webidls/Worklet.webidl b/components/script/dom/webidls/Worklet.webidl
new file mode 100644
index 00000000000..5bb39bebd96
--- /dev/null
+++ b/components/script/dom/webidls/Worklet.webidl
@@ -0,0 +1,13 @@
+/* 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/. */
+
+// https://drafts.css-houdini.org/worklets/#worklet
+[Exposed=(Window)]
+interface Worklet {
+ [NewObject] Promise<void> addModule(USVString moduleURL, optional WorkletOptions options);
+};
+
+dictionary WorkletOptions {
+ RequestCredentials credentials = "omit";
+};
diff --git a/components/script/dom/webidls/WorkletGlobalScope.webidl b/components/script/dom/webidls/WorkletGlobalScope.webidl
new file mode 100644
index 00000000000..ca29296a10e
--- /dev/null
+++ b/components/script/dom/webidls/WorkletGlobalScope.webidl
@@ -0,0 +1,10 @@
+/* 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/. */
+
+// https://drafts.css-houdini.org/worklets/#workletglobalscope
+// TODO: The spec IDL doesn't make this a subclass of EventTarget
+// https://github.com/whatwg/html/issues/2611
+[Exposed=Worklet]
+interface WorkletGlobalScope: GlobalScope {
+};