Liking cljdoc? Tell your friends :D

web.workers.FetchEvent

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.
raw docstring

clientcljs

(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`
sourceraw docstring

client-idcljs

(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`
sourceraw docstring

is-reloadcljs

(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`
sourceraw docstring

(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`
sourceraw docstring

preload-requestcljs

(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`
sourceraw docstring

preload-responsecljs

(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`
sourceraw docstring

replaces-client-idcljs

(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`
sourceraw docstring

requestcljs

(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`
sourceraw docstring

respond-withcljs

(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`
sourceraw docstring

resulting-client-idcljs

(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`
sourceraw docstring

set-preload-request!cljs

(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`
sourceraw docstring

wait-untilcljs

(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`
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close