« Return to Thread: Event.fix optimisation

Re: Event.fix optimisation

by Diego Perini :: Rate this Message:

Reply to Author | View in Thread


Arrix,
the link at Mozilla has no explanation either, anyway
I remember falling in to a problem with "originalTarget"
in which it pointed to a DIV not existing in the DOM.

After searching I discovered that "internally" they use
a DIV for the element construction and that DIV does
not exist in the DOM, and any tentative to access it's
properties will yield an error of type "access denied".

That's the reason I am concerned about it's use, it can
lead developers to use it and then complain, and
those kind of problems are hard to track down.

We should enforce users to use proper DOM specs
and try to avoid to give extra paths if those paths
are not offering extra functionality cross-browser.

Anyway tank you for being with us, your comments
and heads up are strongly appreciated.


Diego Perini


On 8 Mag, 03:33, Arrix <arrixz...@...> wrote:

> Diego,
> You are right. "originalTarget" and "explicitOriginalTarget" are Mozilla
> specific and should not be copied by jQuery.
> I am using jQuey in firefox extension development. A recent update of jQuery
> broken some of my old code. Now I've changed my code to use target instead
> of originalTarget.
> Here is a page comparing event targets:http://developer.mozilla.org/en/docs/DOM:event:Comparison_of_Event_Ta...
>
> I thought originalTarget was part of DOM2 standard. Sorry!
>
>
>
> On Thu, May 8, 2008 at 3:33 AM, Diego Perini <diego.per...@...> wrote:
>
> > Arrix,
> > "originalTarget" and "explicitOriginalTarget" are Mozilla specific
> > properties and not part of DOM2 specs that I know.
>
> > You surely have a valid use for them if you proposed, can you
> > show me a simple use case where "target", "currenTarget" and
> > "relatedTarget" are not enough ?
>
> > How can we handle/simulate those capabilities in other browsers
> > like IE or Opera so they are usable in practice ?
>
> > --
> > Diego Perini
>
> > On 7 Mag, 06:02, Arrix <arrixz...@...> wrote:
> > > originalTarget is not copied to the cloned event object but I think it's
> > > quite useful.
> > > BTW, what properties should be copied?
>
> > > --
> > > Arrix
>
> --
> Arrix
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "jQuery Development" group.
To post to this group, send email to jquery-dev@...
To unsubscribe from this group, send email to jquery-dev-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

 « Return to Thread: Event.fix optimisation

LightInTheBox - Buy quality products at wholesale price!