jwilsson / domtokenlist

A super duper strict shim/polyfill for DOMTokenList, classList and relList.
MIT License
12 stars 16 forks source link

provide polyfill as UMD #15

Closed rodneyrehm closed 8 years ago

rodneyrehm commented 8 years ago

covers #12. Provides all the polyfill files as one UMD file (dist/domtokenlist-polyfill-umd.js) that has dist/domtokenlist-umd.js as a dependency. This way you can either load the default dist/domtokenlist.js and get everything patched up right away, or conveniently load/access the polyfills and the DOMTokenList implementation as separate bundles.

TrySound commented 8 years ago

I have an idea for a different bundling. Do not merge yet. I want to try that.

rodneyrehm commented 8 years ago

yeah, this PR may improve loading things, but it doesn't help if you need to apply the shim to nested documents (e.g. <iframe>). dist/domtokenlist-polyfill-umd.js should export a function that takes root as it's argument, so that you can pass in window (and other window references).

rodneyrehm commented 8 years ago

@TrySound are you still working on this?