1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4 * You can obtain one at http://mozilla.org/MPL/2.0/.
6 * The origin of this IDL file is
7 * http://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html
9 * You are granted a license to use, reproduce and create derivative works of
13 [Global=(Worker,ServiceWorker),
14 Exposed=ServiceWorker]
15 interface ServiceWorkerGlobalScope : WorkerGlobalScope {
16 // FIXME(nsm): Bug 982725
17 // readonly attribute CacheList caches;
19 readonly attribute ServiceWorkerClients clients;
21 [Unforgeable] readonly attribute DOMString scope;
23 // FIXME(nsm): Bug 995484
24 // ResponsePromise<any> fetch((Request or [EnsureUTF16] DOMString) request);
29 Promise<boolean> unregister();
31 attribute EventHandler oninstall;
32 attribute EventHandler onactivate;
33 attribute EventHandler onfetch;
34 attribute EventHandler onbeforeevicted;
35 attribute EventHandler onevicted;
37 // The event.source of these MessageEvents are instances of Client
38 attribute EventHandler onmessage;
40 // close() method inherited from WorkerGlobalScope is not exposed.
41 // FIXME(nsm): For now, overridden so it can be a no-op.