dom/webidl/ServiceWorkerGlobalScope.webidl
author Jason Gersztyn <jgersztyn13@wou.edu>
Wed, 04 Mar 2015 15:59:17 -0800
changeset 232061 977e7f1f392714eac911b668a0b524ecf3305332
parent 229996 39354f436e2b7d5ecde0b7fbbdfbc1fe797c12be
child 232290 dccc995ad9c1aba55cb05dd8a43798aa71af0926
permissions -rw-r--r--
Bug 1132673 - Removing the scope line from ServiceWorkerGlobalScope and changing the signature and body of getScope. r=nsm,baku

/* -*- 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.
 */

[Global=(Worker,ServiceWorker),
 Exposed=ServiceWorker]
interface ServiceWorkerGlobalScope : WorkerGlobalScope {
  // FIXME(nsm): Bug 982725
  // readonly attribute CacheList caches;

  readonly attribute Clients clients;

  // FIXME(nsm): Bug 995484
  // ResponsePromise<any> fetch((Request or [EnsureUTF16] DOMString) request);

  void update();

  [Throws]
  Promise<boolean> unregister();

  attribute EventHandler oninstall;
  attribute EventHandler onactivate;
  attribute EventHandler onfetch;
  attribute EventHandler onbeforeevicted;
  attribute EventHandler onevicted;

  // The event.source of these MessageEvents are instances of Client
  attribute EventHandler onmessage;

  // close() method inherited from WorkerGlobalScope is not exposed.
  // FIXME(nsm): For now, overridden so it can be a no-op.
  void close();
};