Comparing version 0.2.5 to 0.2.6
@@ -213,3 +213,3 @@ 'use strict'; | ||
get defaultView() { | ||
return new Proxy(globalThis, { | ||
const window = new Proxy(globalThis, { | ||
/* c8 ignore start */ | ||
@@ -221,3 +221,3 @@ get: (globalThis, name) => { | ||
case 'window': | ||
return this.defaultView; | ||
return window; | ||
case 'customElements': | ||
@@ -233,2 +233,3 @@ if (!this._customElements.define) | ||
}); | ||
return window; | ||
} | ||
@@ -235,0 +236,0 @@ |
@@ -212,3 +212,3 @@ import {DOCUMENT_NODE, TEXT_NODE, DOM} from './constants.js'; | ||
get defaultView() { | ||
return new Proxy(globalThis, { | ||
const window = new Proxy(globalThis, { | ||
/* c8 ignore start */ | ||
@@ -220,3 +220,3 @@ get: (globalThis, name) => { | ||
case 'window': | ||
return this.defaultView; | ||
return window; | ||
case 'customElements': | ||
@@ -232,2 +232,3 @@ if (!this._customElements.define) | ||
}); | ||
return window; | ||
} | ||
@@ -234,0 +235,0 @@ |
{ | ||
"name": "linkedom", | ||
"version": "0.2.5", | ||
"version": "0.2.6", | ||
"description": "A triple-linked lists based DOM implementation", | ||
@@ -5,0 +5,0 @@ "main": "./cjs/index.js", |
@@ -75,3 +75,3 @@ # 🔗 linkedom | ||
import {parseHTML} from 'linkedom'; | ||
function JSDOM(html) { return {window: parseHTML(html).defaultView}; } | ||
function JSDOM(html) { return parseHTML(html).defaultView; } | ||
@@ -78,0 +78,0 @@ // now you can do the same as you would with JSDOM |
1620579
7579