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
event.respondWith()
method, which allows us to provide a response
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 `event.respondWith()` method, which allows us to provide a response this fetch.
(client this)
Property.
[Read Only] [Deprecated] [Experimental]
The FetchEvent.client read-only property returns the web.service-workers.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. [Read Only] [Deprecated] [Experimental] The FetchEvent.client read-only property returns the `web.service-workers.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.
[Read Only]
The clientId read-only property of the web.workers.FetchEvent
the id of the web.service-workers.Client
that the current service
is controlling.
var myClientId = FetchEvent.clientId;
See also: https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/clientId
Property. [Read Only] The clientId read-only property of the `web.workers.FetchEvent` the id of the `web.service-workers.Client` that the current service is controlling. `var myClientId = FetchEvent.clientId;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/clientId`
(constructor & args)
Constructor.
The FetchEvent() constructor creates a new web.workers.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.fetch.Request
object that would have triggered the event handler.
clientId: The web.service-workers.Client
that the current service worker is controlling. This property is not yet implemented in Chrome.
isReload: A js.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.workers.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.fetch.Request` object that would have triggered the event handler. clientId: The `web.service-workers.Client` that the current service worker is controlling. This property is not yet implemented in Chrome. isReload: A `js.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.
[Read Only] [Experimental]
The isReload read-only property of the web.workers.FetchEvent
returns true if the event was dispatched by the user attempting
reload the page, and false otherwise. Pressing the refresh button
a reload while clicking a link and pressing the back button is
var reloaded = FetchEvent.isReload
See also: https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/isReload
Property. [Read Only] [Experimental] The isReload read-only property of the `web.workers.FetchEvent` returns true if the event was dispatched by the user attempting reload the page, and false otherwise. Pressing the refresh button a reload while clicking a link and pressing the back button is `var reloaded = FetchEvent.isReload` See also: `https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/isReload`
(navigation-preload this)
Property.
[Read Only] [Experimental]
The navigationPreload read-only property of the web.workers.FetchEvent
returns a js.Promise
that resolves to the instance of web.service-workers.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. [Read Only] [Experimental] The navigationPreload read-only property of the `web.workers.FetchEvent` returns a `js.Promise` that resolves to the instance of `web.service-workers.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.
[Read Only]
The preloadResponse read-only property of the web.workers.FetchEvent
returns a js.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. [Read Only] The preloadResponse read-only property of the `web.workers.FetchEvent` returns a `js.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.
[Read Only]
The replacesClientId read-only property of the web.workers.FetchEvent
is the id
of the client
that is being replaced during a page
var myReplacedClientId = FetchEvent.replacesClientId;
See also: https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/replacesClientId
Property. [Read Only] The replacesClientId read-only property of the `web.workers.FetchEvent` is the `id` of the `client` that is being replaced during a page `var myReplacedClientId = FetchEvent.replacesClientId;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/replacesClientId`
(request this)
Property.
[Read Only]
The request read-only property of the web.workers.FetchEvent
returns the web.fetch.Request
that triggered the event handler.
var recentRequest = FetchEvent.request;
See also: https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/request
Property. [Read Only] The request read-only property of the `web.workers.FetchEvent` returns the `web.fetch.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.workers.FetchEvent
prevents
browser's default fetch handling, and allows you to provide a
for a web.fetch.Response
yourself.
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.workers.FetchEvent` prevents browser's default fetch handling, and allows you to provide a for a `web.fetch.Response` yourself. `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.
[Read Only]
The resultingClientId read-only property of the web.workers.FetchEvent
is the id
of the client
that replaces the previous client
a page navigation.
var myResultingClientId = FetchEvent.resultingClientId;
See also: https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/resultingClientId
Property. [Read Only] The resultingClientId read-only property of the `web.workers.FetchEvent` is the `id` of the `client` that replaces the previous client a page navigation. `var myResultingClientId = FetchEvent.resultingClientId;` See also: `https://developer.mozilla.org/en-US/docs/Web/API/FetchEvent/resultingClientId`
(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`
(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