Last active
January 12, 2026 04:55
-
-
Save cpojer/e66f9a082021a82230f2595a6027f161 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/lib/jsdom/browser/Window.js b/lib/jsdom/browser/Window.js | |
| index 52d011cae61c3688ec64baa5cec411d55edbda9d..298d7ec8d2cc1ea5e974262b978e6041389900f7 100644 | |
| --- a/lib/jsdom/browser/Window.js | |
| +++ b/lib/jsdom/browser/Window.js | |
| @@ -507,8 +507,8 @@ function installOwnProperties(window, options) { | |
| // [LegacyUnforgeable]: | |
| window: { configurable: false }, | |
| document: { configurable: false }, | |
| - location: { configurable: false }, | |
| - top: { configurable: false } | |
| + location: { configurable: true }, | |
| + top: { configurable: false }, | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
FYI this no longer seems to work on jsdom
27.4.0(of course line numbers have changed, but I mean the patch in general doesn't work anymore). Despite settingconfigurabletotrue, I getError: Not implemented: navigation (except hash changes).Edit: Never mind. My issue was that I had a direct dependency against
jsdom. I removed it from my own package and just usejest-environment-jsdomwhich internally depends onjsdom.Then you need to create this patch file
patches/jest-environment-jsdom++jsdom+26.1.0.patch(This will patch the
jsdomthat is insidejest-environment-jsdom)And run
npx patch-package