Re: cloneNode() and events

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 UTC