aboutsummaryrefslogtreecommitdiff
path: root/src/ClientUtils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/ClientUtils.ts')
-rw-r--r--src/ClientUtils.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ClientUtils.ts b/src/ClientUtils.ts
index e1f490c1a..03ff13924 100644
--- a/src/ClientUtils.ts
+++ b/src/ClientUtils.ts
@@ -476,7 +476,10 @@ export function smoothScrollHorizontal(duration: number, element: HTMLElement |
export function addStyleSheet() {
const style = document.createElement('style');
const sheets = document.head.appendChild(style);
- return sheets.sheet;
+ return sheets;
+}
+export function removeStyleSheet(sheet?: HTMLStyleElement) {
+ sheet && document.head.removeChild(sheet);
}
export function addStyleSheetRule(sheet: CSSStyleSheet | null, selector: string, css: string | { [key: string]: string }, selectorPrefix = '.') {
const propText =