Explain it in 60 seconds
postMessage and cross-window communication
Frontend Engineering · Async JavaScript and the Browser · Intermediate
How does postMessage work for communicating between windows, iframes and workers?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Send messages across origins safely.
- targetWindow.postMessage(data, targetOrigin).
- Receiver checks event.origin.
- Structured clone of data.
- Validate message contents.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.