Use correct document when creating elements

This commit is contained in:
Daniel Imms
2023-10-16 11:09:36 -07:00
parent 4245283e05
commit c80453f602
12 changed files with 40 additions and 28 deletions
+1
View File
@@ -113,6 +113,7 @@ export namespace css {
let $ctx: CanvasRenderingContext2D | undefined;
let $litmusColor: CanvasGradient | undefined;
if (!isNode) {
// This is guaranteed to run in the first window, so document should be correct
const canvas = document.createElement('canvas');
canvas.width = 1;
canvas.height = 1;