← Back to release summary

FetchEvent.handled

Category
Service Worker
Type
New or changed feature
Status
Enabled by default (Chrome 86)
Intent stage
Shipped

WPT details: https://wpt.fyi/results/service-workers/service-worker?label=master&label=experimental&aligned&q=service-workers%2Fservice-worker%2Ffetch-event-handled.https.html

Summary

A FetchEvent dispatched to a service worker is in a loading pipeline, which is performance sensitive. The new FetchEvent.handled property returns a promise that resolves when a response is returned from a service worker to its client. This enables a service worker to delay tasks that can only run after responses are complete.

Standards & signals

Ecosystem

Docs: https://github.com/w3c/ServiceWorker/issues/1397

Samples: https://github.com/w3c/ServiceWorker/issues/1397#issuecomment-479036562

Explainers: https://github.com/tingshao/FetchEvent.handled

View on chromestatus.com