dom/webidl/FetchEvent.webidl
author Mike de Boer <mdeboer@mozilla.com>
Fri, 10 Apr 2015 13:23:14 +0200
changeset 267072 719d7e41abeac7fee33b6d7ab4676ed6b537c3af
parent 266438 b3abbecbd3c1b145b743db740df70f6c87b2beaa
child 288990 27db61bad678e26b030a8a2b2de586e0d6abcaf7
permissions -rw-r--r--
Bug 1132301 - Part 5: Add unit tests for the Social Sharing feature of Loop. r=Standard8, a=lizzard

/* -*- 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/.
 *
 * For more information on this interface, please see
 * http://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html
 */

[Constructor(DOMString type, optional FetchEventInit eventInitDict),
 Func="mozilla::dom::workers::ServiceWorkerVisible",
 Exposed=(ServiceWorker)]
interface FetchEvent : Event {
  readonly attribute Request request;

  // https://github.com/slightlyoff/ServiceWorker/issues/631
  readonly attribute Client? client; // The window issuing the request.
  readonly attribute boolean isReload;

  [Throws]
  void respondWith((Response or Promise<Response>) r);
};

dictionary FetchEventInit : EventInit {
  Request request;
  Client client;
  boolean isReload;
};