6 ms·
Particularly events. I think there are technically 3 different ways to create event handlers, one for each of the major js engines of the early 2000's.
by kedean 11y ago
Particularly events. I think there are technically 3 different ways to create event handlers, one for each of the major js engines of the early 2000's.
- TazeTSchnitzel 11y agoListeners are complicated, but .onclick and friends work everywhere and always have.
- acdha 11y agoFor the simplest cases, yes, but even there you could easily find oddities with things like cancellation, bubbling, timing with regards to other events, support for various element types, etc. Here's a whole list just for click, which is probably the most standardized event handler, and doesn't even go back before the IE5.5 era: http://quirksmode.org/dom/events/click.html http://quirksmode.org/dom/events/click.html
- LoSboccacc 11y agoto double down, touch events on mobile browsers are in a different order than mouse event in regards of onclicks, so that a touchend and mouseup fire at the opposite side of the click event on some mobile browser but not all.
- untog 11y agoUntil you want to add more than one onclick event.