fantasyland / fantasy-land

Specification for interoperability of common algebraic structures in JavaScript
MIT License
10.08k stars 373 forks source link

Improve portability of the UMD build #328

Open chocolateboy opened 3 years ago

chocolateboy commented 3 years ago

This PR:

globalThis is the official way to refer to the global scope and is supported by almost all environments:

engine self globalThis
Node.js
QuickJS
SpiderMonkey
Modern browsers
Deno
IE11

The notable exception is IE11, which will need to use a polyfill. If IE11 support was previously promised or assumed, then this would be a breaking change.

davidchambers commented 3 years ago

Thanks for the pull request, @chocolateboy! I pushed a few tweaks to your branch. Are you happy with them?

chocolateboy commented 3 years ago

Yes, LGTM, thanks!