On 7/23/2009 9:03 PM, qufighter wrote:
> I managed to get the event in you just have to pass it through all the
> levels
>
> div2.addEventListener('click', function(ev){ doNothing(ev);}, true);
> and
> function doNothing(ev){ alert(ev); }
Or not inject all the unnecessary fluff:
div2.addEventListener('click', doNothing, false);
And it will be passed as the first argument, that's how addEventListener
works.
> ev.source was not defined either way, but there is another way to get
> the event target
Shockingly enough, it's the ".target" property of the event object.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"greasemonkey-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/greasemonkey-users?hl=en
-~----------~----~----~----~------~----~------~--~---