Discussion:
event.target document
rvj
2010-05-19 18:31:33 UTC
Permalink
Assuming a number of document are nested with a click event handler defined
in one of the parent documents

how do you figure out the document in which a click event actually occurred?

As far as I can tell event.target.ownerDocument will return the document
where the event handler is

but not the document containing the node generating the event

Is there any thing like

event.target.targetDocument

or a work around?

PS sorry for cross post
Boris Zbarsky
2010-05-20 03:20:26 UTC
Permalink
Post by rvj
Assuming a number of document are nested with a click event handler defined
in one of the parent documents
how do you figure out the document in which a click event actually occurred?
As far as I can tell event.target.ownerDocument will return the document
where the event handler is
event.originalTarget.ownerDocument?

-Boris
rvj
2010-05-20 05:50:39 UTC
Permalink
... joy !
Post by Boris Zbarsky
Post by rvj
Assuming a number of document are nested with a click event handler defined
in one of the parent documents
how do you figure out the document in which a click event actually occurred?
As far as I can tell event.target.ownerDocument will return the document
where the event handler is
event.originalTarget.ownerDocument?
-Boris
Hunt25Angela
2011-08-13 13:01:26 UTC
Permalink
freelance writer

Continue reading on narkive:
Loading...