We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It turns out that text nodes containing text with a - will be turned into several text nodes in IE11:
-
var frag = document.createDocumentFragment(); var text = document.createTextNode('some-text'); frag.appendChild(text); var clone = frag.cloneNode(true); // clone.childNodes.length -> 3 instead of 1
Due to this we have to fall back to the less performant node cloning already used in IE 9 and 10 for now.
Possible optimizations could be to re-consolidate multiple adjacent text nodes if they initially contained a - (also see Node.normalize).
The text was updated successfully, but these errors were encountered:
I found that cloneNode only behaves incorrectly after we set up a MutationObserver on the documentElement.
cloneNode
documentElement
var frag = document.createDocumentFragment(); var text = document.createTextNode('some-text'); var observer = new MutationObserver(function(mutations) {}); frag.appendChild(text); var clone = frag.cloneNode(true); // clone.childNodes.length -> 1 observer.observe(document.documentElement, { childList: true, subtree: true }); clone = frag.cloneNode(true); // clone.childNodes.length -> 3
Sorry, something went wrong.
No branches or pull requests
It turns out that text nodes containing text with a
-
will be turned into several text nodes in IE11:Due to this we have to fall back to the less performant node cloning already used in IE 9 and 10 for now.
Possible optimizations could be to re-consolidate multiple adjacent text nodes if they initially contained a
-
(also see Node.normalize).The text was updated successfully, but these errors were encountered: