preloadResponse property
@AvailableInWorkers("service")
The preloadResponse read-only property of the FetchEvent interface
returns a Promise that resolves to the navigation preload Response if
navigation preload
was triggered, or undefined otherwise.
Navigation preload is triggered if
navigation preload is enabled,
the request is a GET request, and the request is a navigation request
(generated by the browser when loading pages and iframes).
A service worker can wait on this promise in its fetch event handler in order to track completion of a fetch request made during service-worker boot.
Implementation
external JSPromise<JSAny?> get preloadResponse;