MCPcopy Create free account
hub / github.com/ampproject/amphtml / installRuntimeStylesPromise

Function installRuntimeStylesPromise

testing/describes.js:921–930  ·  view source on GitHub ↗

* @param {!Window} win

(win)

Source from the content-addressed store, hash-verified

919 * @param {!Window} win
920 */
921function installRuntimeStylesPromise(win) {
922 if (win.document.querySelector('style[amp-runtime]')) {
923 // Already installed.
924 return;
925 }
926 const style = document.createElement('style');
927 style.setAttribute('amp-runtime', '');
928 style./*OK*/ textContent = ampDocCss + ampSharedCss;
929 win.document.head.appendChild(style);
930}
931
932/**
933 * @param {!Window} win

Callers 2

setupMethod · 0.85
setupMethod · 0.85

Calls 1

setAttributeMethod · 0.45

Tested by

no test coverage detected