From 184475d827bcb20bd7be06be1f7ec38bd5c595b3 Mon Sep 17 00:00:00 2001 From: farfromrefug <> Date: Thu, 4 Jul 2024 11:53:51 +0200 Subject: [PATCH] fix: use window.document in all cases --- src/dom/basicdom/element-registry.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dom/basicdom/element-registry.ts b/src/dom/basicdom/element-registry.ts index ae789227..cf2d5066 100644 --- a/src/dom/basicdom/element-registry.ts +++ b/src/dom/basicdom/element-registry.ts @@ -27,7 +27,7 @@ export function registerElement(elementName: string, resolver: () => ElementNode export function createElement(elementName: string, owner?: DocumentNode): ElementNode { if (!owner) { - owner = document as unknown as DocumentNode; + owner = window.document as unknown as DocumentNode; } const normalizedName = normalizeElementName(elementName); const elementDefinition = elementMap[normalizedName];