Compare commits

...

6 Commits

Author SHA1 Message Date
94127227a6 1.0.79 2020-12-01 21:06:54 +00:00
b5af1b1226 fix(core): update 2020-12-01 21:06:53 +00:00
a6f382dd7f 1.0.78 2020-12-01 17:31:38 +00:00
0de00cb2c1 fix(core): update 2020-12-01 17:31:37 +00:00
570a026cf8 1.0.77 2020-11-30 20:03:05 +00:00
48b5cc770c fix(core): update 2020-11-30 20:03:05 +00:00
4 changed files with 11 additions and 2 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "@designestate/dees-domtools", "name": "@designestate/dees-domtools",
"version": "1.0.76", "version": "1.0.79",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@ -1,6 +1,6 @@
{ {
"name": "@designestate/dees-domtools", "name": "@designestate/dees-domtools",
"version": "1.0.76", "version": "1.0.79",
"private": false, "private": false,
"description": "tools to simplify complex css structures", "description": "tools to simplify complex css structures",
"main": "dist_ts/index.js", "main": "dist_ts/index.js",

View File

@ -143,6 +143,14 @@ export class DomTools {
this.elements.headElement.appendChild(styleElement); this.elements.headElement.appendChild(styleElement);
} }
public async setExternalCss(cssLinkArg: string) {
const cssTag = document.createElement('link');
cssTag.rel = 'stylesheet';
cssTag.crossOrigin = 'anonymous';
cssTag.href = cssLinkArg;
document.head.append(cssTag);
}
public setVirtualViewport(environmentArg: TViewport) { public setVirtualViewport(environmentArg: TViewport) {
this.domToolsStatePart.dispatchAction(this.actionSetVirtualViewport, environmentArg); this.domToolsStatePart.dispatchAction(this.actionSetVirtualViewport, environmentArg);
} }

View File

@ -32,6 +32,7 @@ export class ThemeManager {
} }
private async updateAllConnectedElements() { private async updateAllConnectedElements() {
document.body.style.background = this.goBrightBoolean ? '#fff' : '#000';
this.domtoolsRef.elementInstrumenter.forEachelement(async elementArg => { this.domtoolsRef.elementInstrumenter.forEachelement(async elementArg => {
await this.setThemeStatusForElement(elementArg, this.goBrightBoolean); await this.setThemeStatusForElement(elementArg, this.goBrightBoolean);
}); });