← Back to release summary

FetchEvent.handled

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

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

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