Re: ACTION-70: Define the scope chain of onFoo events reference issue-1

* Jim Ley wrote:
>"Maciej Stachowiak" <mjs@apple.com>
>>> 1) Event listeners can not (and I also believe should not) be  capable of 
>>> changing by modification of element attributes
>>
>> With the following test case, Safari, Firefox and Opera respect the  DOM 
>> change and reflect it with a changed event handler:
>
>I believe this is inconsistent behaviour, and should be changed:
>
><script id=chicken>
>function chicken() { alert(1); }
></script>
>
>and
>
>document.getElementById('chicken').firstChild.nodeValue="function chicken() 
>{ alert(2); }"
>
>does not result in a change to the script, so it is unclear to me why 
>changing an attribute should be reflected in script.  Similarly with XML 
>event handlers and changing the content - currently they do not get changed.

Do you mean the nodeValue is not changed, or that the nodeValue is
changed but the script is not re-evaluated? In case of the latter,
what do implementations do if the <script> script is evaluated again,
e.g., when the script element is an event handler using for="" or
XML Events in Opera's implementation? If the changes are not reflected
even if the script is re-evaluated, then that's indeed unexpected and
should be changed.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

Received on Tuesday, 14 March 2006 13:18:49 UTC