NavigationPreloadManager extension type
The NavigationPreloadManager
interface of the
Service Worker API
provides methods for managing the preloading of resources in parallel with
service worker bootup.
If supported, an object of this type is returned by ServiceWorkerRegistration.navigationPreload. The result of a preload fetch request is waited on using the promise returned by FetchEvent.preloadResponse.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
disable(
) → JSPromise< JSAny?> -
The
disable()
method of the NavigationPreloadManager interface halts the automatic preloading of service-worker-managed resources previously started using NavigationPreloadManager.enable It returns a promise that resolves withundefined
. -
enable(
) → JSPromise< JSAny?> -
The
enable()
method of the NavigationPreloadManager interface is used to enable preloading of resources managed by the service worker. It returns a promise that resolves withundefined
. -
getState(
) → JSPromise< NavigationPreloadState> -
The
getState()
method of the NavigationPreloadManager interface returns aPromise
that resolves to an object with properties that indicate whether preload is enabled and what value will be sent in the HTTP header. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setHeaderValue(
String value) → JSPromise< JSAny?> -
The
setHeaderValue()
method of the NavigationPreloadManager interface sets the value of the header that will be sent with requests resulting from afetch
operation made during service worker navigation preloading. It returns an emptyPromise
that resolves withundefined
. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited