* @param {!Window} win
(win)
| 933 | * @param {!Window} win |
| 934 | */ |
| 935 | function installAmpAdStylesPromise(win) { |
| 936 | if (win.document.querySelector('style[amp-extension="amp-ad"]')) { |
| 937 | // Already installed. |
| 938 | return; |
| 939 | } |
| 940 | const style = document.createElement('style'); |
| 941 | style.setAttribute('amp-extension', 'amp-ad'); |
| 942 | style./*OK*/ textContent = CSS; |
| 943 | win.document.head.appendChild(style); |
| 944 | } |
| 945 | |
| 946 | /** |
| 947 | * Creates a custom element without registration. |