package js.html
extends ExtendableEvent › Event
Available on jsThe parameter passed into the
ServiceWorkerGlobalScope.onfetch
handler,FetchEvent
represents a fetch action that is dispatched on theServiceWorkerGlobalScope
of 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:String
Returns the id of the client that the current service worker is controlling.
read only isReload:Bool
Returns 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:Request
Returns the Request
that triggered the event handler.
respondWith (r:Promise<Response>):Void
Throws:
null |
DOMError |
---|
© 2005–2016 Haxe Foundation
Licensed under a MIT license.
http://api.haxe.org/js/html/FetchEvent.html