FetchEvent() constructor creates a new
var fetchEvent = new FetchEvent(type, init);
DOMStringobject specifying which event the object represents. This is always
fetchfor Fetch events.
An object conforming to the
FetchEventInitdictionary, containing options to apply to the event object. Options are as follows:
Clientthat the current service worker is controlling.
Booleanthat signifies whether the page was reloaded or not when the event was dispatched.
trueif yes, and
falseif not. Typically, pressing the refresh button in a browser is a reload, while clicking a link and pressing the back button is not. If not present, it defaults to
Promisewhich returns a previously-loaded response to the client.
DOMStringwhich identifies the client which is being replaced by
DOMStringcontaining the new
clientIdif the client changes as a result of the page load.
Requestobject that would have triggered the event handler.
The definition of 'FetchEvent() constructor' in that specification.
|Working Draft||Initial definition.|
BCD tables only load in the browser