Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Type check for shived innerHTML #102

Open
wants to merge 1 commit into
base: defineProperty
Choose a base branch
from
Open

Updated Type check for shived innerHTML #102

wants to merge 1 commit into from

Conversation

Nevraeka
Copy link

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.

@aFarkas
Copy link
Owner

aFarkas commented Jun 9, 2013

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.

@Nevraeka
Copy link
Author

Cool. Sorry for the delay in checking this. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants