.postMessage and MessageEvent

suggest change

Syntax

transfer may be omitted. The listener receives a MessageEvent. Check event.origin before using event.data. A page you do not control can send a message if it has a reference to your window.

Parameters

Parameter Description
message Data sent with the structured clone algorithm.
targetOrigin Expected origin of the target window, scheme://host:port, with no path. "*" accepts any origin. Prefer a specific origin.
transfer Optional list of transferable objects. They are moved, not copied.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents