FetchEvent

package js.html

extends ExtendableEventEvent

Available on js

This is the event type for fetch events dispatched on the service worker global scope. It contains information about the fetch, including the request and how the receiver will treat the response. It provides the event.respondWith() method, which allows us to provide a response to this fetch.

Documentation FetchEvent by Mozilla Contributors, licensed under CC-BY-SA 2.5.

See also:

Constructor

new(type:String, eventInitDict:FetchEventInit)

Throws:

null

DOMError

Variables

read onlyclientId:String

The Client.id of the same-origin Client that initiated the fetch.

read onlyisReload:Bool

read onlyrequest:Request

The Request the browser intends to make.

Methods

respondWith(r:Promise<Response>):Void

Prevent the browser's default fetch handling, and provide (a promise for) a response yourself.

Throws:

null

DOMError

© 2005–2020 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/html/FetchEvent.html