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

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

Inconsistency is very annoying for the author.

Cheers,

Jim. 

Received on Tuesday, 14 March 2006 12:57:47 UTC