Liking cljdoc? Tell your friends :D

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

clientcljs

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

client-idcljs

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

constructorcljs

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

is-reloadcljs

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

(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`
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.

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

replaces-client-idcljs

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

requestcljs

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

respond-withcljs

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

resulting-client-idcljs

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

set-client!cljs

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

set-client-id!cljs

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

set-is-reload!cljs

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

set-navigation-preload!cljs

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

set-preload-response!cljs

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

set-replaces-client-id!cljs

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

set-request!cljs

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

set-resulting-client-id!cljs

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