W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2002

Re: cloneNode() and events

From: Fabian Guisset <fguisset@softhome.net>
Date: Wed, 20 Mar 2002 17:33:24 +0100
Message-ID: <3C98B9D4.1050507@softhome.net>
To: Jonas Sicking <sicking@bigfoot.com>
CC: www-dom@w3.org
Jonas Sicking wrote:
> Fabian Guisset wrote:
> 
>>M.Hompus@gac.nl wrote:
>>
>>>My code of the node:
>>>
>>>// Create prototype image
>>>var protoImg = doc.createElement('img');
>>>protoImg.src = './images/zoom.gif';
>>>protoImg.style.width = '16px';
>>>protoImg.style.height = '16px';
>>>protoImg.style.marginLeft = '2px';
>>>protoImg.style.verticalAlign = 'middle';
>>>protoImg.alt = protoImg.title = aProperties[1];
>>>try {
>>>     // Mozilla
>>>     protoImg.addEventListener('click', FL_DrawZoom, false);
>>>} catch(e) {
>>>     // Internet Explorer
>>>     protoImg.attachEvent('onclick', FL_DrawZoom);
>>>}
>>>
>>
> [snip]
> 
>>In Mozilla we just fixed CloneNode() to behave the same way as Internet
>>Explorer. That should be the behavior in Mozilla 1.0, although, if big
>>problems (regressions, ...) arise from that change, it might be reversed.
> 
> 
> Didn't that only clone eventlistners added using "onclick"-like attributes,
> not onces added using addEventListner as in the example?
> 
> / Jonas Sicking
> 
> 

Yes that's true.

-Fabian.
Received on Wednesday, 20 March 2002 11:31:58 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:55 GMT