package js.html
extends ExtendableEvent › Event
Available on jsThe parameter passed into the
ServiceWorkerGlobalScope.onfetchhandler,FetchEventrepresents a fetch action that is dispatched on theServiceWorkerGlobalScopeof aServiceWorker. It contains information about the request and resulting response, and provides theFetchEvent.respondWith()method, which allows us to provide an arbitrary response back to the controlled page.Documentation FetchEvent by Mozilla Contributors, licensed under CC-BY-SA 2.5.
See:
new (type:String, eventInitDict:FetchEventInit)Throws:
null |
DOMError |
|---|
read only clientId:StringReturns the id of the client that the current service worker is controlling.
read only isReload:BoolReturns a Boolean that is true if the event was dispatched with the user's intention for the page to reload, and false otherwise. Typically, pressing the refresh button in a browser is a reload, while clicking a link and pressing the back button is not.
read only request:RequestReturns the Request that triggered the event handler.
respondWith (r:Promise<Response>):VoidThrows:
null |
DOMError |
|---|
© 2005–2018 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/html/FetchEvent.html