Service Worker: Client.postMessage() and ServiceWorkerMessageEvent

Before Chrome 45, a Service Worker sending a message via Client.postMessage() results in a MessageEvent fired on the Client's global scope (e.g., window). Since Chrome 45, the event is a ServiceWorkerMessageEvent fired on navigator.serviceWorker rather than window. Until Chrome 45, Client.postMessage displayed an "experimental, may change" deprecation warning.

Demo

Documentation

Specification

Working draft or equivalent

Status in Chromium

Blink>ServiceWorker


Enabled by default (tracking bug) in:

  • Chrome for desktop release 45
  • Chrome for Android release 45
  • Opera release 32
  • Opera for Android release 32

Consensus & Standardization

After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.

  • Public support
  • Shipped
  • No public signals
  • No signals

Owners

Last updated on 2018-04-26