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

Re: cloneNode() and events

From: Jonas Sicking <sicking@bigfoot.com>
Date: Wed, 20 Mar 2002 16:47:36 +0100
Message-ID: <00ed01c1d026$8f4e69e0$b3e0d0d9@telia.com>
To: <www-dom@w3.org>
Cc: "Fabian Guisset" <fguisset@softhome.net>
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
Received on Wednesday, 20 March 2002 11:10:39 GMT

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