Bumping gaia.json for 2 gaia revision(s) a=gaia-bump
[gecko.git] / dom / webidl / InstallEvent.webidl
blob525c8438142a93716b6384789a85c986584c5546
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
4  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5  *
6  * For more information on this interface, please see
7  * http://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html
8  */
10 // While not explicitly restricted to ServiceWorkerGlobalScope, it probably
11 // should be. https://github.com/slightlyoff/ServiceWorker/issues/254
12 [Constructor(DOMString type, optional InstallEventInit eventInitDict),
13  Func="mozilla::dom::workers::ServiceWorkerEventsVisible",
14  // XXXbz I have no idea where this should be exposed.  The spec makes
15  // no sense.  But since it returns a ServiceWorker and that's only
16  // exposed in Window, let's say Window.
17  Exposed=Window]
18 interface InstallEvent : InstallPhaseEvent {
19   // The currently active worker for this scope when this worker is asked to
20   // install itself.
21   // This may be null when a ServiceWorker is being installed for a previously
22   // uncontrolled scope.
23   // https://github.com/slightlyoff/ServiceWorker/issues/260
24   readonly attribute ServiceWorker? activeWorker;
25   void replace();
28 // Should be in the spec soon to satisfy conventions about events.
29 // https://github.com/slightlyoff/ServiceWorker/issues/216.
30 dictionary InstallEventInit : EventInit {
31   ServiceWorker? activeWorker = null;