[prev in list] [next in list] [prev in thread] [next in thread] 

List:       whatwg
Subject:    Re: [whatwg] When a script element's child nodes are changed
From:       David Flanagan <dflanagan () mozilla ! com>
Date:       2011-10-28 19:07:32
Message-ID: 4EAAFD74.6000109 () mozilla ! com
[Download RAW message or body]

On 10/28/11 12:03 PM, Bjoern Hoehrmann wrote:
> * 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.
>
Thanks, Bjoern. That makes it a lot harder for me to argue that the spec 
should change to match Chrome, Safari and Opera... But can we at least 
change  "when child nodes change" to something like "when the text IDL 
attribute changes from the empty string to a non-empty string"?

     David

>> 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.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic