Skip to content

Instantly share code, notes, and snippets.

@roberocity
Created September 21, 2011 16:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save roberocity/1232524 to your computer and use it in GitHub Desktop.
Save roberocity/1232524 to your computer and use it in GitHub Desktop.
Minimum needed to support HTML5 element in IE < 9
// @roberocity
// this is the minimum to do to provide html5 element support for older versions of IE
for(i in k='abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|subline|summary|time|video'.split('|')){document.createElement(k[i]);}
// a better solution may be by @rem, @jon_neal & @aFarkas, but I've had a few errors when printing using this: http://html5shim.googlecode.com/svn/trunk/html5.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment