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

IE8: `document.createElement` creates HTML5 elements without HTML namespace #54

jamesreggio opened this issue Mar 15, 2012 · 1 comment


Copy link

@jamesreggio jamesreggio commented Mar 15, 2012

Execute in IE8:

n = document.createElement('nav');
// <:nav></:nav>

n = document.createElement('NAV');
// <NAV></NAV>

The latter result is desirable; the former, undesirable. Further inspection shows that the former element has an empty scopeName, whereas the latter has HTML for its scopeName.

This seems to be an issue with calling cloneNode() on the cached copy of the nav element. cloneNode() inexplicably loses the namespace in IE8 (and I can't seem to find documentation showing that this is by design). Making the tag name all-caps bypasses the cache and produces the correct result.

I tried going through the blame/history to see when this issue may have been introduced, but it seems to have been around for a while...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.