This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

bindAsEventListener

 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the following snipit:



I'd like the user to be able to define their own even handlers for onmouseout, etc, and be able to bind user defined events, rather than having to have them change the code in the above snipit. Is that possible? Someway for the user to pass in the event in the initialize: function() ?

Thanks.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You probably want to look into new Function() or call(). If you look at the ContentLoader from my book or look at prototype or dojo, they use call.

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic