postMessage
Widely available
The postMessage()
global method sends cross-origin messages to windows and workers, including popups and iframes. Also known as cross-document messaging.
To learn more, see
Window: postMessage() method,
Worker: postMessage() method at MDN.
Compatibility (view on caniuse.com)
- Chrome 2 Released on 2009-05-21
- Chrome Android 18 Released on 2012-06-27
- Edge 12 Released on 2015-07-29
- Firefox 3 Released on 2008-06-17
- Firefox for Android 4 Released on 2011-03-29
- Safari 4 Released on 2009-06-08
- Safari on iOS 3.2 Released on 2010-04-03
Specifications
- HTML Standard (#web-messaging), from HTML Workstream (WHATWG).