Options dictionary for postMessage methods

An optional PostMessageOptions object is being added to the postMessage() function for 6 of the 7 interfaces where it’s supported, specifically, DedicatedWorkerGlobalScope, Worker, ServiceWorker, ServiceWorker, and Window. This gives the function a similar interface on its definitions and allows it to be extended in the future. Since broadcastChannel.postMessage() doesn't take additional arguments (such as transfer) it is not being changed.

Demo

Documentation

Specification

Working draft or equivalent

Status in Chromium

Blink>DOM


Enabled by default (tracking bug) in:

  • Chrome for desktop release 70
  • Chrome for Android release 70
  • Android WebView release 70
  • Opera release 57
  • Opera for Android release 57

Consensus & Standardization

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

Owner

Last updated on 2018-09-05