Web: update PWA theme_color dynamically based on theme

This commit is contained in:
Benjamin Pasero
2019-09-27 07:43:17 +02:00
parent e0762af258
commit fa9c39ae35
2 changed files with 24 additions and 1 deletions

View File

@@ -781,6 +781,12 @@ export function createStyleSheet(container: HTMLElement = document.getElementsBy
return style;
}
export function createMetaElement(container: HTMLElement = document.getElementsByTagName('head')[0]): HTMLMetaElement {
let meta = document.createElement('meta');
container.appendChild(meta);
return meta;
}
let _sharedStyleSheet: HTMLStyleElement | null = null;
function getSharedStyleSheet(): HTMLStyleElement {
if (!_sharedStyleSheet) {