GoogleChrome / proxy-polyfill

Proxy object polyfill
Apache License 2.0
1.14k stars 175 forks source link

Make me able to import the polyfill as an object, not assign to window. #41

Closed wbern closed 6 years ago

wbern commented 6 years ago

React and other libraries likely have issues with that this proxy polyfill is semi-functional (sealed).

I would really appreciate if I was able to just import this package and use it where I know it's necessary, instead of applying it to the window in every case.

React 16.3.0-alpha.0 fixes this issue, but as Proxy becomes more popular, it is likely to appear in other libraries sooner or later.

PR: https://github.com/facebook/react/commit/80d6792882e65951aac179d5cb976ad5621f4c4e Issue: https://github.com/facebook/react/issues/12011

ealush commented 6 years ago

Hey @wbern, should be solved with the most recent update. You can get it right away by consuming the ~minified file directly from this repo~, or wait for @samthor to publish it to npm.

EDIT: Sorry, meant the non minified, src/proxy.js file.

wbern commented 6 years ago

Amazing! Thanks!