Skip to content

Instantly share code, notes, and snippets.

@cpojer
Created June 9, 2025 08:11
Show Gist options
  • Save cpojer/e66f9a082021a82230f2595a6027f161 to your computer and use it in GitHub Desktop.
Save cpojer/e66f9a082021a82230f2595a6027f161 to your computer and use it in GitHub Desktop.
diff --git a/lib/jsdom/browser/Window.js b/lib/jsdom/browser/Window.js
index 52d011cae61c3688ec64baa5cec411d55edbda9d..5b29f5af81331e49903514000959ea6e15b07ce6 100644
--- a/lib/jsdom/browser/Window.js
+++ b/lib/jsdom/browser/Window.js
@@ -507,7 +507,7 @@ function installOwnProperties(window, options) {
// [LegacyUnforgeable]:
window: { configurable: false },
document: { configurable: false },
- location: { configurable: false },
+ location: { configurable: true },
top: { configurable: false }
});
@cpojer
Copy link
Author

cpojer commented Jun 9, 2025

Put this into a patches folder and add this configuration to your package.json:

"pnpm": {
    "patchedDependencies": {
      "jsdom": "patches/jsdom.patch"
    }
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment