FetchEvent class
The parameter passed into the ServiceWorkerGlobalScope.onfetch handler, FetchEvent represents a fetch action that is dispatched on the ServiceWorkerGlobalScope of a ServiceWorker. It contains information about the request and resulting response, and provides the FetchEvent.respondWith() method, which allows us to provide an arbitrary response back to the controlled page.
- Implemented types
Properties
- bubbles → bool?
-
no setteroverride
- cancelable → bool?
-
no setteroverride
- client → ServiceWorkerClient
-
Returns the Client that the current service worker is controlling.
no setter
- clientId → String?
-
Returns the id of the client that the current service worker is controlling.
no setter
- composed → bool?
-
no setteroverride
- currentTarget → EventTarget?
-
no setteroverride
- defaultPrevented → bool
-
no setteroverride
- eventPhase → int
-
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- 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.
no setter
- isTrusted → bool?
-
no setteroverride
- matchingTarget → Element
-
A pointer to the element whose CSS selector matched within which an event
was fired. If this Event was not associated with any Event delegation,
accessing this value will throw an UnsupportedError.
no setteroverride
-
path
→ List<
EventTarget> -
no setteroverride
- request → Request
-
Returns the Request that triggered the event handler.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- target → EventTarget?
-
no setteroverride
- timeStamp → double?
-
no setteroverride
- type → String
-
no setteroverride
Methods
-
composedPath(
) → List< EventTarget> -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
preventDefault(
) → void -
override
-
respondWith(
Future< Response> response) → void -
stopImmediatePropagation(
) → void -
override
-
stopPropagation(
) → void -
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited