2014-05-14 01:28:01 +04:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* 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
|
|
|
|
* http://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html
|
|
|
|
*
|
|
|
|
* You are granted a license to use, reproduce and create derivative works of
|
|
|
|
* this document.
|
|
|
|
*/
|
|
|
|
|
2014-08-05 06:20:33 +04:00
|
|
|
[Global=(Worker,ServiceWorker),
|
2014-08-05 06:20:34 +04:00
|
|
|
Exposed=ServiceWorker]
|
2014-05-14 01:28:01 +04:00
|
|
|
interface ServiceWorkerGlobalScope : WorkerGlobalScope {
|
2015-02-20 18:16:17 +03:00
|
|
|
readonly attribute Clients clients;
|
2015-04-04 08:46:07 +03:00
|
|
|
readonly attribute ServiceWorkerRegistration registration;
|
2014-05-14 01:28:01 +04:00
|
|
|
|
2015-06-02 14:12:00 +03:00
|
|
|
[Throws]
|
|
|
|
Promise<boolean> skipWaiting();
|
|
|
|
|
2014-05-14 01:28:01 +04:00
|
|
|
attribute EventHandler oninstall;
|
|
|
|
attribute EventHandler onactivate;
|
2015-06-13 02:28:13 +03:00
|
|
|
|
|
|
|
[Func="mozilla::dom::workers::ServiceWorkerGlobalScope::InterceptionEnabled"]
|
2014-05-14 01:28:01 +04:00
|
|
|
attribute EventHandler onfetch;
|
|
|
|
attribute EventHandler onbeforeevicted;
|
|
|
|
attribute EventHandler onevicted;
|
|
|
|
|
|
|
|
// The event.source of these MessageEvents are instances of Client
|
|
|
|
attribute EventHandler onmessage;
|
|
|
|
};
|
|
|
|
|
2015-04-23 21:43:40 +03:00
|
|
|
// These are from w3c.github.io/push-api/
|
|
|
|
partial interface ServiceWorkerGlobalScope {
|
|
|
|
attribute EventHandler onpush;
|
|
|
|
attribute EventHandler onpushsubscriptionchange;
|
|
|
|
};
|
2014-05-14 01:28:01 +04:00
|
|
|
|