Execute in IE8:
n = document.createElement('nav');
console.log(n.outerHTML);
// <:nav></:nav>
n = document.createElement('NAV');
console.log(n.outerHTML);
// <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...
Execute in IE8:
The latter result is desirable; the former, undesirable. Further inspection shows that the former element has an empty
scopeName, whereas the latter hasHTMLfor itsscopeName.This seems to be an issue with calling
cloneNode()on the cached copy of thenavelement.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...