Adrià Vilanova MartÃnez | 917797e | 2024-05-25 22:41:25 +0200 | [diff] [blame] | 1 | import CssSelectorNodeWatcherScriptHandler from '../../../common/architecture/scripts/nodeWatcher/handlers/CssSelectorNodeWatcherScriptHandler'; |
| 2 | import { NodeMutation } from '../../../common/nodeWatcher/NodeWatcherHandler'; |
| 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 | } |