Reference
These words match CONTEXT.md. Lessons use these words only.
https://app.example. Do not use “domain” or “site”
for this.
iframe.contentWindow, window.parent,
window.top, window.opener, or the
result of window.open. Same origin: you can use it
as the window. Different origin: you can send data with
postMessage.
null.
otherWindow.postMessage(data, targetOrigin). The
browser sends a
structured clone of
data to the other window. This is not a function
call.
"/" means “the same origin as you” (this is the
default). "*" means any origin.
event.source.postMessage(reply, event.origin).
Compare it to
iframe.contentWindow
to find the iframe element. Later this field can also be a
MessagePort.
data,
origin, and
source.
postMessage.
data: URLs, a sandbox iframe without
allow-same-origin, often file:. The
text of this origin is "null". You cannot set
targetOrigin to "null". You must use
"*" to send to it.
postMessage. The Structured Clone topic owns the
type list.
postMessage after ready.
targetOrigin. On a
port message, event.origin is the empty string.
port.close() disconnects the pair. After close, a
send does not arrive. The other end fires
close.