WindowEventHandlers.onmessage

U leest de Engelstalige versie van deze inhoud, omdat er nog geen vertaling voor deze taal beschikbaar is. Help ons dit artikel te vertalen!

This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The onmessage property of the WindowEventHandlers mixin is the EventHandler called whenever an object receives a message event.

Syntax

window.addEventListener('message', function(event) { ... })
window.onmessage = function(event) { ... }

Specifications

Specification Status Comment
HTML Living Standard
The definition of 'onmessage' in that specification.
Living Standard Initial definition.

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
onmessageChrome Full support 60Edge ? Firefox ? IE ? Opera Full support 47Safari ? WebView Android Full support 60Chrome Android Full support 60Firefox Android ? Opera Android Full support 44Safari iOS ? Samsung Internet Android ?

Legend

Full support  
Full support
Compatibility unknown  
Compatibility unknown