[whatwg] When a script element's child nodes are changed

* David Flanagan wrote:
>All browsers do that correctly.  The case I'm interested in is this one:
>
>     var s1 = document.createElement("script");
>     var t1 = document.createTextNode("");
>     s1.appendChild(t1);
>     document.head.appendChild(s1);
>     t1.appendData("alert('changed text node data');");
>
>Firefox runs this script and Chrome, Safari and Opera do not. (I don't 
>have a windows installation, so I haven't tested IE)

In "IE9 standards" mode IE9 displays the alert.

>We're not done yet, though.  If I comment out the appendData() call in 
>the code above and replace it with this line:
>
>     s1.appendChild(document.createTextNode("alert('then added a new 
>text node');"));

As above, IE9 displays the alert.
-- 
Bj?rn H?hrmann ? mailto:bjoern at hoehrmann.de ? http://bjoern.hoehrmann.de
Am Badedeich 7 ? Telefon: +49(0)160/4415681 ? http://www.bjoernsworld.de
25899 Dageb?ll ? PGP Pub. KeyID: 0xA4357E78 ? http://www.websitedev.de/ 

Received on Friday, 28 October 2011 12:03:00 UTC