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.

on
Implemented types

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 with undefined.
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 with undefined.
getState() JSPromise<NavigationPreloadState>
The getState() method of the NavigationPreloadManager interface returns a Promise 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 a fetch operation made during service worker navigation preloading. It returns an empty Promise that resolves with undefined.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited