Lightweight library for cross-browser event support [closed]

你离开我真会死。 提交于 2019-12-19 04:07:28

问题


Cross-browser handling is quite a hassle sometimes.

In this case I need to capture quite a number of events, but cannot afford to use a multi purpose library that exceeds 10ish Kb. (e.g. jQuery, Prototype, Dojo, YUI, ...)

The script is meant as a basic tracking tool for various sites I'm maintaining.

Every browser seems to handle events slightly and sometimes completely differently!


I would be really happy if someone could point me out to a Javascript library meant for cross-browser event handling.

This would make my day! =)


回答1:


Dean Edwards' : http://dean.edwards.name/weblog/2005/10/add-event2/

Or the one from John Resig: http://ejohn.org/blog/flexible-javascript-events/




回答2:


I'm not sure how much event handling you need to do or if you're looking to add custom events, but here's another option if you're feeling curious. It uses Dean Edwards and adds on some bells and whistles to come in around 5K minified.

https://github.com/fat/bean



来源:https://stackoverflow.com/questions/3317266/lightweight-library-for-cross-browser-event-support

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!