Closed ottomated closed 4 months ago
Thank you for reporting @ottomated! :slightly_smiling_face:
I'm trying to reproduce the problem, but it seems like it is working in my environment.
I can't access the codesandbox. Is it possible for you to change permission?
It seems like it is working here: https://stackblitz.com/edit/stackblitz-starters-ghue6z?file=index.js
Updated permissions
@ottomated thank you for updating permissions.
There is a fix in now that solves the problem: https://github.com/capricorn86/happy-dom/releases/tag/v14.1.2
I described the problem and solution in the release notes:
Object.getOwnPropertyDescriptors(window)
to read which properties to register globally, but getters and setters are defined on the prototypeGlobalWindow
now defines the properties on the instance when it is constructedThanks for the quick fix!
Describe the bug Prior to 14.1.1, global uses of
localStorage
would work as expected. They no longer do.To Reproduce See codesandbox repro
Expected behavior Global uses of window globals should work as expected.
Device: All