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

Function nonSensitiveDataPostMessage

3p/messaging.js:11–19  ·  view source on GitHub ↗
(type, opt_object)

Source from the content-addressed store, hash-verified

9 * @deprecated Use iframe-messaging-client.js
10 */
11export function nonSensitiveDataPostMessage(type, opt_object) {
12 if (window.parent == window) {
13 return; // Nothing to do.
14 }
15 const object = opt_object || /** @type {JsonObject} */ ({});
16 object['type'] = type;
17 object['sentinel'] = window.context.sentinel;
18 window.parent./*OK*/ postMessage(object, window.context.location.origin);
19}
20
21/**
22 * Message event listeners.

Callers 1

gltfViewerFunction · 0.90

Calls 1

postMessageMethod · 0.45

Tested by

no test coverage detected