diff options
Diffstat (limited to 'components/script/dom/webidls/ServiceWorkerRegistration.webidl')
-rw-r--r-- | components/script/dom/webidls/ServiceWorkerRegistration.webidl | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/components/script/dom/webidls/ServiceWorkerRegistration.webidl b/components/script/dom/webidls/ServiceWorkerRegistration.webidl index 27c27d7cc41..f7a10659513 100644 --- a/components/script/dom/webidls/ServiceWorkerRegistration.webidl +++ b/components/script/dom/webidls/ServiceWorkerRegistration.webidl @@ -1,15 +1,17 @@ /* 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/. */ -// https://w3c.github.io/ServiceWorker/#service-worker-registration-obj -[Pref="dom.serviceworker.enabled", Exposed=(Window,Worker)] +// https://w3c.github.io/ServiceWorker/#serviceworkerregistration-interface +[Pref="dom.serviceworker.enabled", SecureContext, Exposed=(Window,Worker)] interface ServiceWorkerRegistration : EventTarget { - [Unforgeable] readonly attribute ServiceWorker? installing; - [Unforgeable] readonly attribute ServiceWorker? waiting; - [Unforgeable] readonly attribute ServiceWorker? active; + readonly attribute ServiceWorker? installing; + readonly attribute ServiceWorker? waiting; + readonly attribute ServiceWorker? active; + [SameObject] readonly attribute NavigationPreloadManager navigationPreload; readonly attribute USVString scope; + readonly attribute ServiceWorkerUpdateViaCache updateViaCache; // [NewObject] Promise<void> update(); // [NewObject] Promise<boolean> unregister(); @@ -17,3 +19,9 @@ interface ServiceWorkerRegistration : EventTarget { // event // attribute EventHandler onupdatefound; }; + +enum ServiceWorkerUpdateViaCache { + "imports", + "all", + "none" +}; |