문제

I'm looking to be able to use, in perhaps a couple lines of code, an external call to load every single webshim for a browser.

I understand that this would load the browser with dozens of useless shims. For quick development, this is fine for a short period (really!). As my site is ready to launch and I've figured out which shims need to stay, I'd want to be able to pass a whitelist and/or blacklist of features, modernizr style, so that I wouldn't be using unneeded shims.

What I'm hoping to avoid is basically having to compare various shims, and instead have a single service that loads the latest version of the best of breed. I'd also want it to consolidate the js files that are downloaded.

In short a "modernize_all", which shims everything by default, for instance during a quick web hack meetup or when time is limited. Also can be passed only the specific tests to modernize at a later time to save browser downloads & memory.

도움이 되었습니까?

해결책

None exist, however the current moderizr github repo has a list of polyfills. It would be trivial to build a dev version of modernizr, download all of the linked shims, and then set up a bunch of yepnopes

다른 팁

The Webshim JSFiddle examples all call the Git JS directly: http://afarkas.github.io/webshim/js-webshim/minified/polyfiller.js. I have tried this on CodePen myself for experiment purposes and it works fine polyfilling all components you specify. Be sure to include jQuery and Modernizer too.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top