krambuhl / custom-event-polyfill

Polyfill for creating CustomEvents on IE9/10/11 if native implementation is missing.
MIT License
112 stars 19 forks source link

Module compatibility #3

Closed GabeMedrash closed 9 years ago

GabeMedrash commented 9 years ago

Would you accept a PR for bundling this for module usage? I'm thinking, particularly, plugging it into something like https://github.com/umdjs/umd/blob/master/returnExportsGlobal.js.

krambuhl commented 9 years ago

I think this module is appropriate as a auto-polyfill. some people will want to use this API without having to rewrite code to use a custom module. That said, https://www.npmjs.com/package/custom-event looks like does what you are asking already.

I tend to prefer the commonjs/amd style, because the intent becomes more clear, but at the same time there is not a need for 2 modules that do the same thing. Hope that helps.