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

Ads

    Page List

      Most comments

      ricos ricos
      1 comments
      be Belgium
      Root Server Root Server
      1 comments
      de Germany
      steph steph
      1 comments
      sg Singapore

      RecentComments

      Comment RSS

      Now Reading

      Professional WCF Programming: .NET Development with the Windows Communication Foundation (Programmer to Programmer) by Scott Klein
      Professional Windows Workflow Foundation by Todd Kitta

      Popuri.us

      My Popularity (by popuri.us)