This is the event type for fetch events dispatched on the service
global scope. It contains information about the fetch, including
request and how the receiver will treat the response. It provides
web.event.respondWith()
method, which allows us to provide
response to this fetch.
This is the event type for fetch events dispatched on the service global scope. It contains information about the fetch, including request and how the receiver will treat the response. It provides `web.event.respondWith()` method, which allows us to provide response to this fetch.
(client this)
Property.
The FetchEvent.client read-only property returns the web.Client
the current service worker is controlling.
var myClient = FetchEvent.client;
See also: https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/client
Property. The FetchEvent.client read-only property returns the `web.Client` the current service worker is controlling. `var myClient = FetchEvent.client;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/client`
(client-id this)
Property.
The clientId read-only property of the web.FetchEvent
returns
id of the web.Client
that the current service worker is controlling.
var myClientId = FetchEvent.clientId;
See also: https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/clientId
Property. The clientId read-only property of the `web.FetchEvent` returns id of the `web.Client` that the current service worker is controlling. `var myClientId = FetchEvent.clientId;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/clientId`
Constructor.
The FetchEvent() constructor creates a new web.FetchEvent
object.
type The type of the Event. init Optional An options object containing any custom settings that you want to apply to the event object. Options are as follows:
request: The web.Request
object that would have triggered the event handler.
clientId: The web.Client
that the current service worker is controlling. This property is not yet implemented in Chrome.
isReload: A web.Boolean
that signifies whether the page was reloaded or not when the event was dispatched. true if yes, and false if 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 false.
See also: https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/FetchEvent
Constructor. The FetchEvent() constructor creates a new `web.FetchEvent` object. type The type of the Event. init Optional An options object containing any custom settings that you want to apply to the event object. Options are as follows: request: The `web.Request` object that would have triggered the event handler. clientId: The `web.Client` that the current service worker is controlling. This property is not yet implemented in Chrome. isReload: A `web.Boolean` that signifies whether the page was reloaded or not when the event was dispatched. true if yes, and false if 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 false. See also: `https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/FetchEvent`
(is-reload this)
Property.
The isReload read-only property of the web.FetchEvent
interface
true if the event was dispatched by the user attempting to reload
page, and false otherwise. Pressing the refresh button is a reload
clicking a link and pressing the back button is not.
var reloaded = FetchEvent.isReload
See also: https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/isReload
Property. The isReload read-only property of the `web.FetchEvent` interface true if the event was dispatched by the user attempting to reload page, and false otherwise. Pressing the refresh button is a reload clicking a link and pressing the back button is not. `var reloaded = FetchEvent.isReload` See also: `https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/isReload`
(navigation-preload this)
Property.
The navigationPreload read-only property of the web.FetchEvent
returns a web.Promise
that resolves to the instance of web.NavigationPreloadManager
with the current service worker registration.
var promise = fetchEvent.navigationPreload
See also: https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/navigationPreload
Property. The navigationPreload read-only property of the `web.FetchEvent` returns a `web.Promise` that resolves to the instance of `web.NavigationPreloadManager` with the current service worker registration. `var promise = fetchEvent.navigationPreload` See also: `https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/navigationPreload`
(preload-request this)
Property.
See also: https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/PreloadRequest
Property. See also: `https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/PreloadRequest`
(preload-response this)
Property.
The preloadResponse read-only property of the web.FetchEvent
returns a web.Promise
that resolves to the navigation preload
if navigation preload was triggered or undefined otherwise.
var expectedResponse = FetchEvent.preloadResponse;
See also: https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/PreloadResponse
Property. The preloadResponse read-only property of the `web.FetchEvent` returns a `web.Promise` that resolves to the navigation preload if navigation preload was triggered or undefined otherwise. `var expectedResponse = FetchEvent.preloadResponse;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/PreloadResponse`
(replaces-client-id this)
Property.
The replacesClientId read-only property of the web.FetchEvent
is the web.id
of the web.client
that is being replaced during
page navigation.
var myReplacedClientId = FetchEvent.replacesClientId;
See also: https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/replacesClientId
Property. The replacesClientId read-only property of the `web.FetchEvent` is the `web.id` of the `web.client` that is being replaced during page navigation. `var myReplacedClientId = FetchEvent.replacesClientId;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/replacesClientId`
(request this)
Property.
The request read-only property of the web.FetchEvent
interface
the web.Request
that triggered the event handler.
var recentRequest = FetchEvent.request;
See also: https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/request
Property. The request read-only property of the `web.FetchEvent` interface the `web.Request` that triggered the event handler. `var recentRequest = FetchEvent.request;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/request`
(respond-with this & args)
Method.
The respondWith() method of web.FetchEvent
prevents the browser's
fetch handling, and allows you to provide a promise for a web.Response
fetchEvent.respondWith( // Promise that resolves to a Response. )
See also: https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/respondWith
Method. The respondWith() method of `web.FetchEvent` prevents the browser's fetch handling, and allows you to provide a promise for a `web.Response` `fetchEvent.respondWith( // Promise that resolves to a Response. )` See also: `https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/respondWith`
(resulting-client-id this)
Property.
The resultingClientId read-only property of the web.FetchEvent
is the web.id
of the web.client
that replaces the previous
during a page navigation.
var myResultingClientId = FetchEvent.resultingClientId;
See also: https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/resultingClientId
Property. The resultingClientId read-only property of the `web.FetchEvent` is the `web.id` of the `web.client` that replaces the previous during a page navigation. `var myResultingClientId = FetchEvent.resultingClientId;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/resultingClientId`
(set-client! this val)
Property.
The FetchEvent.client read-only property returns the web.Client
the current service worker is controlling.
var myClient = FetchEvent.client;
See also: https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/client
Property. The FetchEvent.client read-only property returns the `web.Client` the current service worker is controlling. `var myClient = FetchEvent.client;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/client`
(set-client-id! this val)
Property.
The clientId read-only property of the web.FetchEvent
returns
id of the web.Client
that the current service worker is controlling.
var myClientId = FetchEvent.clientId;
See also: https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/clientId
Property. The clientId read-only property of the `web.FetchEvent` returns id of the `web.Client` that the current service worker is controlling. `var myClientId = FetchEvent.clientId;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/clientId`
(set-is-reload! this val)
Property.
The isReload read-only property of the web.FetchEvent
interface
true if the event was dispatched by the user attempting to reload
page, and false otherwise. Pressing the refresh button is a reload
clicking a link and pressing the back button is not.
var reloaded = FetchEvent.isReload
See also: https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/isReload
Property. The isReload read-only property of the `web.FetchEvent` interface true if the event was dispatched by the user attempting to reload page, and false otherwise. Pressing the refresh button is a reload clicking a link and pressing the back button is not. `var reloaded = FetchEvent.isReload` See also: `https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/isReload`
(set-navigation-preload! this val)
Property.
The navigationPreload read-only property of the web.FetchEvent
returns a web.Promise
that resolves to the instance of web.NavigationPreloadManager
with the current service worker registration.
var promise = fetchEvent.navigationPreload
See also: https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/navigationPreload
Property. The navigationPreload read-only property of the `web.FetchEvent` returns a `web.Promise` that resolves to the instance of `web.NavigationPreloadManager` with the current service worker registration. `var promise = fetchEvent.navigationPreload` See also: `https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/navigationPreload`
(set-preload-request! this val)
Property.
See also: https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/PreloadRequest
Property. See also: `https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/PreloadRequest`
(set-preload-response! this val)
Property.
The preloadResponse read-only property of the web.FetchEvent
returns a web.Promise
that resolves to the navigation preload
if navigation preload was triggered or undefined otherwise.
var expectedResponse = FetchEvent.preloadResponse;
See also: https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/PreloadResponse
Property. The preloadResponse read-only property of the `web.FetchEvent` returns a `web.Promise` that resolves to the navigation preload if navigation preload was triggered or undefined otherwise. `var expectedResponse = FetchEvent.preloadResponse;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/PreloadResponse`
(set-replaces-client-id! this val)
Property.
The replacesClientId read-only property of the web.FetchEvent
is the web.id
of the web.client
that is being replaced during
page navigation.
var myReplacedClientId = FetchEvent.replacesClientId;
See also: https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/replacesClientId
Property. The replacesClientId read-only property of the `web.FetchEvent` is the `web.id` of the `web.client` that is being replaced during page navigation. `var myReplacedClientId = FetchEvent.replacesClientId;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/replacesClientId`
(set-request! this val)
Property.
The request read-only property of the web.FetchEvent
interface
the web.Request
that triggered the event handler.
var recentRequest = FetchEvent.request;
See also: https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/request
Property. The request read-only property of the `web.FetchEvent` interface the `web.Request` that triggered the event handler. `var recentRequest = FetchEvent.request;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/request`
(set-resulting-client-id! this val)
Property.
The resultingClientId read-only property of the web.FetchEvent
is the web.id
of the web.client
that replaces the previous
during a page navigation.
var myResultingClientId = FetchEvent.resultingClientId;
See also: https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/resultingClientId
Property. The resultingClientId read-only property of the `web.FetchEvent` is the `web.id` of the `web.client` that replaces the previous during a page navigation. `var myResultingClientId = FetchEvent.resultingClientId;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/resultingClientId`
(wait-until this promise)
Method.
The extendableEvent.waitUntil() method tells the event dispatcher work is ongoing. It can also be used to detect whether that work successful. In service workers, waitUntil() tells the browser work is ongoing until the promise settles, and it shouldn't terminate service worker if it wants that work to complete.
event.waitUntil(promise)
See also: https://developer.mozilla.org/en-US/docs/Web/API/ExtendableEvent/waitUntil
Method. The extendableEvent.waitUntil() method tells the event dispatcher work is ongoing. It can also be used to detect whether that work successful. In service workers, waitUntil() tells the browser work is ongoing until the promise settles, and it shouldn't terminate service worker if it wants that work to complete. `event.waitUntil(promise)` See also: `https://developer.mozilla.org/en-US/docs/Web/API/ExtendableEvent/waitUntil`
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close