MCPcopy Index your code
hub / github.com/ampproject/amphtml / createMetaHash

Function createMetaHash

extensions/amp-script/0.1/test/unit/test-amp-script.js:306–315  ·  view source on GitHub ↗
(name, content)

Source from the content-addressed store, hash-verified

304 });
305
306 function createMetaHash(name, content) {
307 if (variant.ampdoc === 'shadow') {
308 env.ampdoc.setMetaByName(name, content);
309 } else {
310 const meta = document.createElement('meta');
311 meta.setAttribute('name', name);
312 meta.setAttribute('content', content);
313 env.ampdoc.getHeadNode().appendChild(meta);
314 }
315 }
316
317 describe('checkSha384', () => {
318 it('should resolve if hash exists in meta tag', async () => {

Callers 1

test-amp-script.jsFile · 0.85

Calls 3

setMetaByNameMethod · 0.45
setAttributeMethod · 0.45
getHeadNodeMethod · 0.45

Tested by

no test coverage detected