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
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:
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With