WindowEventHandlers.onmessage

Experimental: 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 event handler called whenever an object receives a message event.

Syntax

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

Specifications

Specification
HTML Standard (HTML)
# handler-window-onmessage

Browser compatibility

BCD tables only load in the browser