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

Function addExtensionScript

test/unit/test-render-delaying-services.js:126–131  ·  view source on GitHub ↗
(win, extensionName)

Source from the content-addressed store, hash-verified

124}
125
126function addExtensionScript(win, extensionName) {
127 const scriptElement = win.document.createElement('script');
128 scriptElement.setAttribute('async', '');
129 scriptElement.setAttribute('custom-element', extensionName);
130 win.document.head.appendChild(scriptElement);
131}

Calls 1

setAttributeMethod · 0.45

Tested by

no test coverage detected