blob: 42c7a59377f0a910c372588dcddc948bcc93414a [file] [log] [blame]
Adrià Vilanova Martínez917797e2024-05-25 22:41:25 +02001import CssSelectorNodeWatcherScriptHandler from '../../../common/architecture/scripts/nodeWatcher/handlers/CssSelectorNodeWatcherScriptHandler';
Adrià Vilanova Martínez43c75202024-10-19 15:55:15 +02002import { NodeMutation } from '../../../presentation/nodeWatcher/NodeWatcherHandler';
Adrià Vilanova Martínez917797e2024-05-25 22:41:25 +02003import { 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}