0

The topic of event handler management has been covered in many places in the past. One location is in the contest by PPK. The winning submission by John Resig has a few problems, and the commentary on the site seems to gravitate to the implementation by Dean Edwards after the analysis of the Resig code.

There are even some more implementations here on stackoverflow such as from: Bill Ayakatubby and Marco Demaio.

Outside of the JavaScript frameworks, what is generally done for supporting event functionality? There are numerous options each with their own benefits and drawbacks. I'm uncertain of which one to use myself. Is there an undeclared de facto?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
sosc
  • 154
  • 1
  • 6
  • Using a toolkit or framework is the undeclared de facto. ;] – Winfield Trail Apr 20 '11 at 04:23
  • 2
    It's horses for courses - first define your requirements. If they are simple, DOM 0 handlers may be sufficient. Otherwise, more complex schemes may be necessary. Libraries are often way too complex because they try to provide a general solution for every eventuality. And for them to work, you have to use their methods for everything else they loose track of things. With javascript (and web development in general), applications often benefit from bespoke solutions rather than use of monolithic frameworks. – RobG Apr 20 '11 at 04:30

1 Answers1

1

There are three unsupported standards for XML event management, which each have JavaScript implementations:

Since none of the standards are implemented cross-browser, the de facto standard is called intrinsic events.

References

Paul Sweatte
  • 24,148
  • 7
  • 127
  • 265