nx-js / observer-util

Transparent reactivity with 100% language coverage. Made with ❤️ and ES6 Proxies.
MIT License
1.2k stars 94 forks source link

fix error "accessing the caller property of a function" on IE11 #43

Open IlyaZha opened 5 years ago

IlyaZha commented 5 years ago

We use observable and observer from your library. After this fix library started working on IE11.

solkimicreb commented 5 years ago

Thanks for your contribution! I am a bit hesitant about merging this though.

This lib will never work in IE11 since it does not support Proxies (and other ES6 features). In fact, this is only an issue which may pop up in unsupported browsers - like IE11 - which did not properly implement the function caller related ES6 changes.

I would rather do a quick support check in the project entry point and log a more meaningful warning in case of unsupported browsers. What's your opinion?

Side note: list of supported platforms is here

IlyaZha commented 5 years ago

So, it's working in IE11 (may be due to babel, I don't know for sure) . If you will not merge this fix, we would just use our patched version of lib. I have read list of unsupported browsers before, but right now we can not refuse IE11 users.

solkimicreb commented 5 years ago

I will look into this tomorrow, sorry for the wait.