creativelive / appear

execute callbacks when dom elements appear in and out of view
http://creativelive.github.io/appear/
MIT License
177 stars 43 forks source link

addEventListener requires 3 arguments #2

Closed ryanjadhav closed 9 years ago

ryanjadhav commented 9 years ago

addEventListener requires 3 arguments otherwise older browsers throw exceptions.

MDN claims its optional, but required for "broad compatibility": https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener

Heres an example of issues happening on iPhone: http://www.sencha.com/forum/showthread.php?139339-quot-Not-enough-arguments-quot-error-caused-by-Ext.History

Other places around the web: https://github.com/teddyzeenny/rsvp.js/commit/1c883635bbfbb627c20fcd197e29f198e30bc970

We think we're seeing these errors in CreativeLive's New Relic Browser Dashboard.

dzoba commented 9 years ago

Check out this PR which also updated removeEventListener calls and updates the minified JS: https://github.com/creativelive/appear/pull/3

ryanjadhav commented 9 years ago

cool im closing this.