Modernizr / Modernizr

Modernizr is a JavaScript library that detects HTML5 and CSS3 features in the user’s browser.
https://www.npmjs.com/package/modernizr
MIT License
25.62k stars 2.99k forks source link

Edit for polyfill wiki question #761

Closed brettz9 closed 11 years ago

brettz9 commented 11 years ago

Since I'd prefer not to make a fork when so many people are used to contributing here, I didn't do so, but before editing the wiki page on polyfills to link to my own plugin (for requirejs) to allow conditional loading of shims, I wanted to get your permission since it is hosted under the Modernizr account/repo. I think there are some compelling reasons to piggy-back on the AMD-compatible module process, so I'd like to offer it there if you are amenable to it. Otherwise, I might just paste the wiki page contents to MDN and see about developing the polyfill list there, as I think there is a need for a library-neutral list of polyfills. Thanks for all your work on supporting polyfills!

sindresorhus commented 11 years ago

Link?

Though I wouldn't see why not.

paulirish commented 11 years ago

@brettz9 can you add a section at the bottom on using polyfills. you can link to the modernizr docs that covers this topic. and link to your setup. i agree that a requirejs plugin is a svelte way to handle this

brettz9 commented 11 years ago

Sorry for the delayed reply. Sure, I can add a section, thank you. (May take a few days to get to it.) Unless you want to keep it open to track it, I think this can be closed, as you've clarified a line of action. Thanks!

brettz9 commented 11 years ago

Oh, and also, since you're ok with the inclusion, I guess you'd also be ok with adding alternate versions of existing shims? For example, an alternate version of a shim for ES6 support which assumes the presence of ES5 support may explicitly declare dependencies via define to conditionally load the ES5 shim if the environment does not already support ES5...

stucox commented 11 years ago

@brettz9 - yep, please do!

Closing.