W3C home > Mailing lists > Public > public-webapi@w3.org > March 2006

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

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Tue, 14 Mar 2006 14:11:57 +0100
To: "Jim Ley" <jim@jibbering.com>
Cc: public-webapi@w3.org
Message-ID: <l1gd1294g901e0ubkctbm6djsokjgrmth5@hive.bjoern.hoehrmann.de>

* 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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:18:53 GMT