aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/webidls/ServiceWorker.webidl
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/webidls/ServiceWorker.webidl')
-rw-r--r--components/script/dom/webidls/ServiceWorker.webidl12
1 files changed, 7 insertions, 5 deletions
diff --git a/components/script/dom/webidls/ServiceWorker.webidl b/components/script/dom/webidls/ServiceWorker.webidl
index 219c25bcd52..60bb6dfc4b9 100644
--- a/components/script/dom/webidls/ServiceWorker.webidl
+++ b/components/script/dom/webidls/ServiceWorker.webidl
@@ -1,19 +1,21 @@
/* 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/. */
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
-// http://w3c.github.io/ServiceWorker/#service-worker-obj
-[Pref="dom.serviceworker.enabled", Exposed=(Window,Worker)]
+// https://w3c.github.io/ServiceWorker/#serviceworker-interface
+[Pref="dom.serviceworker.enabled", SecureContext, Exposed=(Window,Worker)]
interface ServiceWorker : EventTarget {
readonly attribute USVString scriptURL;
readonly attribute ServiceWorkerState state;
- [Throws] void postMessage(any message/*, optional sequence<Transferable> transfer*/);
+ [Throws] void postMessage(any message, sequence<object> transfer);
+ [Throws] void postMessage(any message, optional PostMessageOptions options = {});
// event
attribute EventHandler onstatechange;
};
-ServiceWorker implements AbstractWorker;
+// FIXME: use `includes` instead of `implements` after #22539 is fixed.
+ServiceWorker includes AbstractWorker;
enum ServiceWorkerState {
"installing",