MCPcopy
hub / github.com/ampproject/amphtml / postMessage

Function postMessage

src/iframe-helper.js:353–361  ·  view source on GitHub ↗
(iframe, type, object, targetOrigin, opt_is3P)

Source from the content-addressed store, hash-verified

351 * @param {boolean=} opt_is3P set to true if the iframe is 3p.
352 */
353export function postMessage(iframe, type, object, targetOrigin, opt_is3P) {
354 postMessageToWindows(
355 iframe,
356 [{win: iframe.contentWindow, origin: targetOrigin}],
357 type,
358 object,
359 opt_is3P
360 );
361}
362
363/**
364 * Posts an identical message to multiple target windows with the same

Callers 4

postMessage_Method · 0.90
viewabilityCbFunction · 0.90
postMessageToIframe_Method · 0.90

Calls 1

postMessageToWindowsFunction · 0.85

Tested by

no test coverage detected