The title of this post reads as webdev-hipster as a skinny flannel scarf at an alleycat race. Sorry.
I'm not great with script runtime optimization, so I'm wondering just how bad computationally the following function call is going to be. I know it wouldn't be practical for a big site, but where I wan to use it, the jQuery call is going to return no more than a half dozen objects, so the volume isn't high.
Modernizr.load({
test: Modernizr.borderradius && Modernizr.boxshadow,
nope: "_/js/polyfills/pie.js",
complete: function(){
if(window.PIE){
$('*').css('box-shadow').each(function(){ PIE.attach(this); });
$('*').css('border-radius').each(function(){ PIE.attach(this); });
}
}
});
Thanks everyone.