()
| 162 | const observerOptions: MutationObserverInit = {attributes: true, childList: true, subtree: true, characterData: true}; |
| 163 | |
| 164 | function containsCSSImport() { |
| 165 | if (!(element instanceof HTMLStyleElement)) { |
| 166 | return false; |
| 167 | } |
| 168 | const cssText = removeCSSComments(element.textContent ?? '').trim(); |
| 169 | return cssText.match(cssImportRegex); |
| 170 | } |
| 171 | |
| 172 | // It loops trough the cssRules and check for CSSImportRule and their `href`. |
| 173 | // If the `href` isn't local and doesn't start with the same-origin. |
no test coverage detected