Skip to content

Instantly share code, notes, and snippets.

@remy
Forked from kangax/gist:296114
Created February 6, 2010 16:12
Show Gist options
  • Save remy/296785 to your computer and use it in GitHub Desktop.
Save remy/296785 to your computer and use it in GitHub Desktop.
// original (http://html5shiv.googlecode.com/svn/trunk/html5.js)
(function(){if(!/*@cc_on!@*/0)return;var e = "abbr,article,aside,audio,canvas,datalist,details,figure,figcaption,footer,header,hgroup,mark,menu,meter,nav,output,progress,section,summary,time,video".split(','),i=e.length;while(i--){document.createElement(e[i])}})()
// @rem version - 68 characters less, and much more maintainable than @pornelski - how do you like /them/ apples? :-)
// that said - change @pornelski's version so it uses spaces and it's easy maintainable, and still the shortest. /hattip to @pornelski
/*@cc_on(function(e){for(;e[0];document.createElement(e.pop())){}})('abbr article aside audio canvas details figure footer header hgroup mark menu meter nav output progress section time video'.split(' '))@*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment