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

Method postMessage

third_party/subscriptions-project/swg.js:15480–15494  ·  view source on GitHub ↗

* Posts a message to the iframe with the given data. * * @param {!Object} data

(data)

Source from the content-addressed store, hash-verified

15478 * @param {!Object} data
15479 */
15480 static postMessage(data) {
15481 if (!iframeLoaded) {
15482 buffer.push(data);
15483 return;
15484 }
15485 const postMessageData = Object.assign(
15486 {
15487 'buyFlowActivityMode': buyFlowActivityMode,
15488 'googleTransactionId': googleTransactionId,
15489 'originTimeMs': originTimeMs,
15490 },
15491 data);
15492 postMessageService.postMessage(
15493 postMessageData, PayFrameHelper.getIframeOrigin_());
15494 }
15495
15496 /**
15497 * Sets the activity mode.

Callers 15

sendMessageFunction · 0.45
facebookFunction · 0.45
sendMessageInternal_Method · 0.45
bodymovinanimationFunction · 0.45
sendFunction · 0.45
test-runtime.jsFile · 0.45
requestMacroTask_Method · 0.45

Calls 3

assignMethod · 0.80
getIframeOrigin_Method · 0.80
pushMethod · 0.45

Tested by

no test coverage detected