← Back to release summary

service worker: client.postMessage() is buffered until the document is ready.

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

Summary

To prevent messages from being delivered before the destination is ready, client.postMessage() does not dispatch the message until one of the following has occurred on the destination: - 'DOMContentLoaded' event is fired. - onmessage is set. - startMessages() is called.

Standards & signals

Docs: https://w3c.github.io/ServiceWorker/#dfn-client-message-queue

View on chromestatus.com