Bug 1879816: Make nsCocoaWindow::Destroy close the window and let destruction happen...
[gecko.git] / dom / webidl / ServiceWorkerGlobalScope.webidl
blob914fc37c8beec40ac31ec6569cb6942985df6c53
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/.
5  *
6  * The origin of this IDL file is
7  * http://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html
8  * http://w3c.github.io/push-api/
9  * https://notifications.spec.whatwg.org/
10  *
11  * You are granted a license to use, reproduce and create derivative works of
12  * this document.
13  */
15 [Global=(Worker,ServiceWorker),
16  Exposed=ServiceWorker]
17 interface ServiceWorkerGlobalScope : WorkerGlobalScope {
18   [SameObject, BinaryName="GetClients"]
19   readonly attribute Clients clients;
20   [SameObject] readonly attribute ServiceWorkerRegistration registration;
22   [Throws, NewObject]
23   Promise<undefined> skipWaiting();
25   attribute EventHandler oninstall;
26   attribute EventHandler onactivate;
28   attribute EventHandler onfetch;
30   // The event.source of these MessageEvents are instances of Client
31   attribute EventHandler onmessage;
32   attribute EventHandler onmessageerror;
35 // These are from w3c.github.io/push-api/
36 partial interface ServiceWorkerGlobalScope {
37   attribute EventHandler onpush;
38   attribute EventHandler onpushsubscriptionchange;
41 // https://notifications.spec.whatwg.org/
42 partial interface ServiceWorkerGlobalScope {
43   attribute EventHandler onnotificationclick;
44   attribute EventHandler onnotificationclose;
47 // Mixin the WebExtensions API globals (the actual properties are only available to
48 // extension service workers, locked behind a Func="extensions::ExtensionAPIAllowed" annotation).
49 ServiceWorkerGlobalScope includes ExtensionGlobalsMixin;