2018-09-13 20:04:55 +00:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2015-02-19 01:34:29 +00:00
|
|
|
/* 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
|
|
|
|
*/
|
|
|
|
|
2024-10-24 03:02:37 +00:00
|
|
|
[Func="ServiceWorkersEnabled",
|
2015-02-19 01:34:29 +00:00
|
|
|
Exposed=(ServiceWorker)]
|
2015-10-25 00:24:45 +00:00
|
|
|
interface FetchEvent : ExtendableEvent {
|
2019-09-11 14:35:28 +00:00
|
|
|
constructor(DOMString type, FetchEventInit eventInitDict);
|
|
|
|
|
2019-08-28 17:51:37 +00:00
|
|
|
[SameObject, BinaryName="request_"] readonly attribute Request request;
|
2021-11-08 13:29:31 +00:00
|
|
|
[Pref="dom.serviceWorkers.navigationPreload.enabled"]
|
|
|
|
readonly attribute Promise<any> preloadResponse;
|
2018-08-16 14:20:41 +00:00
|
|
|
readonly attribute DOMString clientId;
|
2018-11-15 08:28:23 +00:00
|
|
|
readonly attribute DOMString resultingClientId;
|
2022-09-21 07:44:58 +00:00
|
|
|
readonly attribute Promise<undefined> handled;
|
2015-02-19 01:34:29 +00:00
|
|
|
|
2015-03-24 07:37:39 +00:00
|
|
|
[Throws]
|
2022-09-21 07:44:58 +00:00
|
|
|
undefined respondWith(Promise<Response> r);
|
2015-02-19 01:34:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
dictionary FetchEventInit : EventInit {
|
2016-01-09 03:35:22 +00:00
|
|
|
required Request request;
|
2018-08-16 14:20:41 +00:00
|
|
|
DOMString clientId = "";
|
2018-11-15 08:28:23 +00:00
|
|
|
DOMString resultingClientId = "";
|
2015-02-19 01:34:29 +00:00
|
|
|
};
|