Closed jamiebuilds closed 8 years ago
@thejameskyle yeah, this sounds like a good idea. It's a breaking change, but that's what major version numbers are for. I'll try to do this today.
I'll make a PR real quick for you
I'm working on it locally right now, but I'll do it in a branch and open a pr on master when I'll point you to so we make sure it meets your needs.
Oh sorry, tunnel vision kicked in and I just did it
ha, beat me to it! We did this almost identically. The only difference is that I created a new file which automatically calls the polyfill for the minified version. That way people can still just load a js script in the client if they need to.
Take a look at #3 and see if that would work!
ok. pushed 2.0.0. Tested and works well.
For posterity if you don't want to call the method (ie, using es6 module syntax, or something) you can also just require the focusin/focusin-polyfill.js
file and it will automatically run the polyfill:
import 'focusin/focusin-polyfill.js'
@thejameskyle feel free to close after you've installed and made sure this works for you.
Works great, thanks
I'm currently trying to use this polyfill for a package of mine that needs to be able to run in both the browser and in node.js. I was wondering if you'd be willing to change the interface of this package so that it is wrapped in a function somehow:
This way I could lazily polyfill it when it is necessary. Other polyfills do this as well.
Related to: https://github.com/thejameskyle/react-modal2/issues/2