HTML and CSS Reference
In-Depth Information
polyfills that provide all sorts of solutions ranging from canvas,
SVG, Web Forms, WebSockets, EventSource, details element,
data-* attributes, and many, many more.
In addition, this resource doesn't just include polyfills, but shims
and other useful libraries as well.
CSS Polyfills
The concept of polyfilling applies to CSS3, also: CSS3Pie ( http://
css3pie.com ) and IE-CSS3 ( http://fetchak.com/ie-css3/ ) make IE6-8
capable of rendering a few of the most useful CSS3 decoration features.
Meanwhile, selectivizr ( http://selectivizr.com ) is a JavaScript utility that
emulates CSS3 pseudo-classes and attribute selectors in IE6-8. eCSS-
tender ( http://ecsstender.org ) is another polyfill. Of course, CSS is never
required for a site to function in the same way an API is—if it is, you're
doing it very wrong. And please note: CSS3 has nothing to do with
HTML5. Think of this as bonus information, because we love you.
A working example with Modernizr
So now you're armed to the teeth with feature detection tech-
niques, and you've written your amazing polyfill script that will
smooth out the cracks in browsers when people visit your site,
but how do you make it all work?
We'll show you how to use Modernizr combined with a super
duper useful tool called yepnope (by Alex Sexton and Ralph
Holzmann at http://yepnopejs.com ) to firstly detect whether the
browser supports the technology you need, and, if it doesn't, load
a polyfill and then get on with loading the rest of your application.
Since the nice folks behind Modernizr care so much about you,
yepnope already comes bundled inside Modernizr with the
Modernizr.load method, so you don't even have to worry
about it.
Let's say your application is going to use sessionStorage .
Yo u ' v e   f o u n d it h e sessionStorage polyfill Remy wrote, but it
also requires JSON support, so we'll need to test for both
sessionStorage and JSON support before our application can
start properly.
 
 
 
Search WWH ::




Custom Search