()
| 383 | const loadingStyleId = ++loadingStylesCounter; |
| 384 | logInfo(`New manager for element, with loadingStyleID ${loadingStyleId}`, element); |
| 385 | function loadingStart() { |
| 386 | if (!isDOMReady() || !documentIsVisible()) { |
| 387 | loadingStyles.add(loadingStyleId); |
| 388 | logInfo(`Current amount of styles loading: ${loadingStyles.size}`); |
| 389 | |
| 390 | const fallbackStyle = createOrUpdateStyle('darkreader--fallback'); |
| 391 | if (!fallbackStyle.textContent) { |
| 392 | fallbackStyle.textContent = getModifiedFallbackStyle(theme!, {strict: false}); |
| 393 | } |
| 394 | } |
| 395 | } |
| 396 | |
| 397 | function loadingEnd() { |
| 398 | loadingStyles.delete(loadingStyleId); |
no test coverage detected