New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Happy DOM - window.Blob is not equal to globalThis.Blob #1323
Comments
I experienced this issue then upgrading from
|
It was actually because we binded function to window on each access resulting in a different function.
We actually had a very over engineered implementation for accessing globals, because jsdom got itself into an infinite loop/failed on accessing EventTarget. I think I fixed it in #1340 tho, and we now use a more simplistic implementation, as you suggested. |
@sheremet-va nice to hear! 馃檪 |
Describe the bug
Hi! 馃檪
A bug was reported in Happy DOM related to "new Blob()" not being an instance of globalThis.Blob.
There seem to be two different implementations of Blob used in window.Blob vs globalThis.Blob. Node does not support Blob, so there must be something else adding the second implementation.
I investigated a bit further and I also noticed that window isn't the same as globalThis and global. Vitest should probably set
global.window
to beglobal
.Related bug in Happy DOM:
capricorn86/happy-dom#471
Reproduction
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: