createElement() method, thus allowing IE to correctly insert these elements into its DOM structure and stylize them. It works very smoothly: first, it checks if conditional comments are enabled by performing the following routine:
In this script, everything is wrapped within a self-executing function. After the first check, the variable
e will be created. This variable is a comma-separated string containing the names of all HTML5 elements. With the aid of the
e is later turned into an array. Using a
for loop on this array, the script invokes the
createElement() method on each element of the array.
The script must be placed within conditional comments, like so:
You can download this script here.