html5shiv icon indicating copy to clipboard operation
html5shiv copied to clipboard

Updated Type check for shived innerHTML

Open Nevraeka opened this issue 11 years ago • 2 comments

The "content" parameter for "innerHTML" was not coerced to a string in the event it is a "Number" type. IE8 internal handles this for standard elements.

Nevraeka avatar May 10 '13 18:05 Nevraeka

Thanks. I just looked into it and I think the following line change would be shorter and more performant:

if (!elem.canHaveChildren || elem.document == ownerDocument || !html5.shivMethods || typeof content != 'string') {
    return innerDesc.set.apply(elem, arguments);
}

Note, I have only added the typeof content check.

aFarkas avatar Jun 09 '13 09:06 aFarkas

Cool. Sorry for the delay in checking this. Thanks

Nevraeka avatar Sep 23 '13 03:09 Nevraeka