pukhalski / tap

1Kb library for easy unified handling of user interactions such as mouse, touch and pointer events.
https://github.com/pukhalski/tap/archive/master.zip
MIT License
527 stars 45 forks source link

Do not try to initialize if 'addEventListener' is not supported. #21

Closed jonifreeman closed 9 years ago

jonifreeman commented 9 years ago

tap.js crashes IE8. We do not need to support touch events for IE8 and can live with normal 'clicks'. After this PR we can still support IE8 in our codebase like follows:

if ('addEventListener' in window)
  $('#any-element').on('tap', callback)
else
  $('#any-element').on('click', callback)
pukhalski commented 9 years ago

Merged. Thanks!