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

Function send

3p/amp-script-proxy-iframe.js:24–29  ·  view source on GitHub ↗

* @param {MessageType} type * @param {*} message

(type, message)

Source from the content-addressed store, hash-verified

22 * @param {*} message
23 */
24function send(type, message) {
25 if (type !== MESSAGE_TYPE.iframeReady && parentOrigin === '*') {
26 throw new Error('Broadcast banned except for iframe-ready message.');
27 }
28 parent./*OK*/ postMessage({type, message}, parentOrigin);
29}
30
31/**
32 *

Callers 3

inflateAndSendRtc_Method · 0.50
mustacheFactoryFunction · 0.50

Calls 1

postMessageMethod · 0.45

Tested by

no test coverage detected