FetchEvent

This is the event type for fetch events dispatched on the ServiceWorkerGlobalScope.

MDN Reference

Constructors

Link copied to clipboard
constructor(type: EventType<FetchEvent>, init: FetchEventInit)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The clientId read-only property of the current service worker is controlling.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The handled property of the FetchEvent interface returns a promise indicating if the event has been handled by the fetch algorithm or not.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The preloadResponse read-only property of the FetchEvent interface returns a Promise that resolves to the navigation preload Response if navigation preload was triggered, or undefined otherwise.

Link copied to clipboard

The request read-only property of the the event handler.

Link copied to clipboard

The resultingClientId read-only property of the navigation.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val type: EventType<FetchEvent>

Functions

Link copied to clipboard
open override fun asInit(): FetchEventInit
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The respondWith() method of allows you to provide a promise for a Response yourself.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun waitUntil(f: Promise<*>)

The ExtendableEvent.waitUntil() method tells the event dispatcher that work is ongoing.