Skip to content

Commit 784c8a5

Browse files
committed
Set EventTarget.prototype to the jsdom's Object.prototype
Previously it was set to the Node.js outer realm's Object.prototype.
1 parent 0314f1e commit 784c8a5

2 files changed

Lines changed: 1 addition & 5 deletions

File tree

lib/jsdom/browser/Window.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,7 @@ exports.createWindow = options => {
172172
Object.setPrototypeOf(window, windowPrototype);
173173
if (makeVMContext) {
174174
Object.setPrototypeOf(window._globalProxy, windowPrototype);
175-
176-
// TODO next major version: include this.
177-
// Object.setPrototypeOf(window.EventTarget.prototype, window.Object.prototype);
175+
Object.setPrototypeOf(window.EventTarget.prototype, window.Object.prototype);
178176
}
179177

180178
// Now that the prototype chain is fully set up, call the superclass setup.

test/web-platform-tests/to-run.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -824,8 +824,6 @@ window-properties.https.html:
824824
"Window replaceable attribute: scrollX": [fail, Incorrectly implemented as a data property]
825825
"Window replaceable attribute: scrollY": [fail, Incorrectly implemented as a data property]
826826
"constructor": [fail-lt-node22, Incorrectly implemented VM global prototype properties]
827-
window-prototype-chain.html:
828-
"Object.prototype": [fail, Tests Object.prototype which jsdom has trouble with due to VM globals]
829827
window-reuse-in-nested-browsing-contexts.tentative.html:
830828
"synchronously navigate iframe with no initial src.": [fail, Unknown]
831829
"after the first iframe load event, navigate iframe with no initial src.": [fail, Unknown]

0 commit comments

Comments
 (0)