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

Function getSentinel_

src/iframe-helper.js:398–400  ·  view source on GitHub ↗

* Gets the sentinel string. * @param {!Element} iframe The iframe. * @param {boolean=} opt_is3P set to true if the iframe is 3p. * @return {string} Sentinel string. * @private

(iframe, opt_is3P)

Source from the content-addressed store, hash-verified

396 * @private
397 */
398function getSentinel_(iframe, opt_is3P) {
399 return opt_is3P ? iframe.getAttribute('data-amp-3p-sentinel') : 'amp';
400}
401
402/**
403 * JSON parses event.data if it needs to be

Callers 2

postMessageToWindowsFunction · 0.85

Calls 1

getAttributeMethod · 0.80

Tested by

no test coverage detected