Skip to content

Instantly share code, notes, and snippets.

@lionelB
Forked from bloodyowl/gist:4340751
Last active December 19, 2015 01:38
Show Gist options
  • Save lionelB/5877042 to your computer and use it in GitHub Desktop.
Save lionelB/5877042 to your computer and use it in GitHub Desktop.

Smallest HTML5 shim ever

130 bytes, that's what it takes.

Script

"header footer section aside nav article figure figcaption hgroup time main video".replace(/\w+/g,function(a){document.createElement(a)})

Usage

Place this in <head></head>.

<script>"header footer section aside nav article figure figcaption hgroup time main video".replace(/\w+/g,function(a){document.createElement(a)})</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment