fix(core): update
This commit is contained in:
28
ts/domtools.classes.thememanager.ts
Normal file
28
ts/domtools.classes.thememanager.ts
Normal file
@ -0,0 +1,28 @@
|
||||
import { DomTools } from './domtools.classes.domtools';
|
||||
import * as plugins from './domtools.plugins';
|
||||
|
||||
export class ThemeManager {
|
||||
public domtoolsRef: DomTools;
|
||||
|
||||
constructor(domtoolsRefArg: DomTools) {
|
||||
this.domtoolsRef = domtoolsRefArg;
|
||||
}
|
||||
|
||||
public goBright() {
|
||||
this.domtoolsRef.elementInstrumenter.forEachelement(async elementArg => {
|
||||
const goBright = (elementArg as any).goBright;
|
||||
if (typeof goBright === 'boolean') {
|
||||
(elementArg as any).goBright = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public goDark() {
|
||||
this.domtoolsRef.elementInstrumenter.forEachelement(async elementArg => {
|
||||
const goBright = (elementArg as any).goBright;
|
||||
if (typeof goBright === 'boolean') {
|
||||
(elementArg as any).goBright = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user