postMessage method
Calls Window.postMessage on this cross-origin window with the given
message
, optionsOrTargetOrigin
if not null
, and transfer
if not
null
.
Implementation
void postMessage(
JSAny? message, [
JSAny? optionsOrTargetOrigin,
JSArray<JSObject>? transfer,
]) {
if (optionsOrTargetOrigin == null) {
_window.postMessage(message);
} else if (transfer == null) {
_window.postMessage(message, optionsOrTargetOrigin);
} else {
_window.postMessage(message, optionsOrTargetOrigin, transfer);
}
}