Stealing Events via Capture

by brunofig 3. February 2007 01:20

 

Are you the kind of person who has always written document.addEventListener("keypress", someFunc, false) and never really looked into the false bit. You just always keep it as false as that is how you copied it from some example the first time?

Hallvord R. M. Steen explains what happens when you go true and capture events:

If you call addEventListener with true as the third argument you create a capturing event. The difference from a normal event is that the capturing listener detects all events in the document before they are sent to the actual target of the event. 

 

[Via Stealing Events via Capture]

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Tags: ,

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading



Powered by BlogEngine.NET 1.4.5.7
Theme by Mads Kristensen

About the author

Hi!

My name is Bruno and I'am a senior consultant. When I'm not working, you can catch me playing with my daugther, taking photos and hanging out with my wife and friends. :)

You can also check my dark side or have fun with my vision of the world.

View Bruno Figueiredo's profile on LinkedIn

TwitterCounter for @brunoshine
 
Creative Commons License

 
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.
 

Ads

    Page List

      Most comments

      Busby SEO Test Busby SEO Test
      2 comments
      kh Cambodia
      laptop cases laptop cases
      2 comments
      Busby SEO Test Busby SEO Test
      1 comments

      RecentComments

      Comment RSS

      Popuri.us

      My Popularity (by popuri.us)