- From: ArkadiuszMichalski <notifications@github.com>
- Date: Tue, 10 May 2016 07:44:41 -0700
- To: w3c/DOM-Parsing <DOM-Parsing@noreply.github.com>
- Cc:
Received on Tuesday, 10 May 2016 14:45:14 UTC
@bzbarsky You mean something like this:
```js
<script>
var str = "<div xmlns='test'></div><p></p>";
var doc = document.implementation.createDocument("http://www.w3.org/1999/xhtml", "body", null);
var doc2 = document.implementation.createDocument("", "body", null);
doc.documentElement.innerHTML = "<script>" + str +"<\/script>";
console.log(doc.documentElement.firstChild.childNodes.length);
doc.documentElement.firstChild.innerHTML = str;
console.log(doc.documentElement.firstChild.childNodes.length);
doc2.documentElement.innerHTML = "<script>" + str +"<\/script>";
console.log(doc2.documentElement.firstChild.childNodes.length);
doc2.documentElement.firstChild.innerHTML = str;
console.log(doc2.documentElement.firstChild.childNodes.length);
</script>
```
And results:
Gecko: `2 1 2 2`
Blink: `2 1 2 1`
Edge/IE11/Presto: `2 2 throw`
---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/DOM-Parsing/issues/6#issuecomment-218179842
Received on Tuesday, 10 May 2016 14:45:14 UTC