diff options
author | bobzel <zzzman@gmail.com> | 2025-05-05 12:37:09 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2025-05-05 12:37:09 -0400 |
commit | 3a733aa0fd24517e83649824dec0fc8bcc0bde43 (patch) | |
tree | ac01848cdab3b83582c0b7ab6f3d2b1c8187a24f /src/ClientUtils.ts | |
parent | e058d227ccbce47c86b0fa558adb01dfccaf4d60 (diff) | |
parent | d4659e2bd3ddb947683948083232c26fb1227f39 (diff) |
Merge branch 'master' into joanne-tutorialagent
Diffstat (limited to 'src/ClientUtils.ts')
-rw-r--r-- | src/ClientUtils.ts | 5 |
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 = |