Modular javascript event library

I want a small library that does DOM4 events. Failing that a sensible subset of DOM3 events will do.

Does it exist?

Answers that are not valid

  • Use large framework X (jQuery, mootools, prototype, etc)
  • Some library that doesn't work in IE8
  • Libraries that do not allow for both capture and bubble phases.

It only needs to work in IE8


I can say with reasonable confidence the answer is no. There was talk of a library called DOMe for level 3 events, but I don't think it ever got off the ground.

There are several reasons why such a library would be difficult:

  • IE 8's never even heard of event capturing (even though it was originally Microsoft's idea).
  • Mutation events are virtually impossible to shim.
  • KeyboardEvent would be a nightmare to get right because of Key Values, I'm not sure it's even feasible to attempt it. This is because keyCode can vary between input languages.

With all that in mind, small library is starting to sound a little too optimistic. To get around the first problem, you'd need to implement the entire event model by binding a handler to an original event that bubbles and pseudo-refire the event on handlers attached via your shimmed methods, starting on the document and working your way to the original event's srcElement/target and back again.

The simplest solution is probably another reason a shim doesn't exist, most people just shim the events they need, if possible, and try to avoid the need for capturing.

Need Your Help

Under What Circumstances Would Javascript Performance be Worse in IE8 than IE7?

javascript internet-explorer browser internet-explorer-8 internet-explorer-7

I work for a company that built interactive seating charts using Javascript. Here's an example: In many ways they

Adding Pagination to Link Headers in Web Api 2

c# pagination web-api

Currently in my Rest service I return paged data using the model that follows.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.