blob: 83942e5fa94f8c5b65bb1c58fc8d5dacc53cc5ed [file] [log] [blame]
Adrià Vilanova Martínez917797e2024-05-25 22:41:25 +02001import CssSelectorNodeWatcherScriptHandler from '../../../common/architecture/scripts/nodeWatcher/handlers/CssSelectorNodeWatcherScriptHandler';
2import { NodeMutation } from '../../../common/nodeWatcher/NodeWatcherHandler';
3import { CCDarkThemeNodeWatcherDependencies } from '../scripts/nodeWatcher.script';
4
5/**
6 * Sets the report dialog iframe's theme to the appropriate theme.
7 */
8export 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}