Adrià Vilanova Martínez | 917797e | 2024-05-25 22:41:25 +0200 | [diff] [blame] | 1 | import CssSelectorNodeWatcherScriptHandler from '../../../common/architecture/scripts/nodeWatcher/handlers/CssSelectorNodeWatcherScriptHandler'; |
Adrià Vilanova Martínez | 43c7520 | 2024-10-19 15:55:15 +0200 | [diff] [blame^] | 2 | import { NodeMutation } from '../../../presentation/nodeWatcher/NodeWatcherHandler'; |
Adrià Vilanova Martínez | 917797e | 2024-05-25 22:41:25 +0200 | [diff] [blame] | 3 | import { CCDarkThemeNodeWatcherDependencies } from '../scripts/nodeWatcher.script'; |
| 4 | |
| 5 | /** |
| 6 | * Sets the report dialog iframe's theme to the appropriate theme. |
| 7 | */ |
| 8 | export default class CCDarkThemeReportDialogHandler extends CssSelectorNodeWatcherScriptHandler<CCDarkThemeNodeWatcherDependencies> { |
| 9 | cssSelector = 'iframe'; |
| 10 | |
| 11 | onMutatedNode(mutation: NodeMutation) { |
| 12 | this.options.reportDialogColorThemeFix.fixThemeIfReportDialogIframeAndApplicable( |
| 13 | mutation.node, |
| 14 | this.options.optionsProvider, |
| 15 | ); |
| 16 | } |
| 17 | } |