From a4c553d8f1ff1c9a8b59bc0d7abd2e08e6d286b8 Mon Sep 17 00:00:00 2001 From: Owen Buckley Date: Tue, 9 Apr 2024 21:02:28 -0400 Subject: [PATCH] CSSStylesheet DOM Shim --- src/dom-shim.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/dom-shim.js b/src/dom-shim.js index ee621ea..8f3c044 100644 --- a/src/dom-shim.js +++ b/src/dom-shim.js @@ -1,5 +1,12 @@ function noop() { } +// https://developer.mozilla.org/en-US/docs/Web/API/CSSStyleSheet/CSSStyleSheet +class CSSStyleSheet { + constructor() { } + replace() { } + replaceSync() { } +} + // https://developer.mozilla.org/en-US/docs/Web/API/EventTarget class EventTarget { constructor() { @@ -146,4 +153,5 @@ class CustomElementsRegistry { globalThis.addEventListener = globalThis.addEventListener ?? noop; globalThis.document = globalThis.document ?? new Document(); globalThis.customElements = globalThis.customElements ?? new CustomElementsRegistry(); -globalThis.HTMLElement = globalThis.HTMLElement ?? HTMLElement; \ No newline at end of file +globalThis.HTMLElement = globalThis.HTMLElement ?? HTMLElement; +globalThis.CSSStyleSheet = globalThis.CSSStyleSheet ?? CSSStyleSheet; \ No newline at end of file