wilsonpage / fastdom

Eliminates layout thrashing by batching DOM measurement and mutation tasks
6.85k stars 240 forks source link

fix: globalThis #132

Closed hedinne closed 8 months ago

hedinne commented 9 months ago

This PR aims to fix a problem I encountered where top level this in global scope was undefined. Most likely because my environment was running in "strict mode". A better description of the problem is in issue #131 .

I only added globalThis and did not replace this since I don't know what browser support this project has, and globalThis is not supported in IE 🙈.

All tests passed.

Sincerely, Hedinn