- From: Joel Richard <ri.joel@gmail.com>
- Date: Sat, 7 Feb 2015 09:53:40 -0600
- To: public-html-comments@w3.org
Received on Monday, 9 February 2015 11:01:33 UTC
Hi, I have noticed that insertAdjacentHTML behaves differently in the latest Chrome/Safari and Firefox/IE for text nodes: var d = document.createElement('div'); d.appendChild(document.createTextNode('abc')); d.insertAdjacentHTML('beforeend', 'def'); console.log(d.childNodes.length); While Chrome/Safari adds a separate text node, Firefox/IE update the previously added text node. This is problematic if you try to get the nodes which were inserted. Since the spec does not mention anything about normalization of text nodes, I have the feeling that FF/IE violate the spec here. Is that correct? If not, would it be possible to define the exact behaviour for text nodes in the spec? - Joel
Received on Monday, 9 February 2015 11:01:33 UTC