Simplifies addEventListener
and removeEventListener
for events that require vendor prefixes.
Adapted from Craig Buckler's article.
npm install prefixed-event
var prefixedEvent = require('prefixed-event')
var el = document.querySelector('.something-animated')
function doSomething(){
prefixedEvent.remove(el, 'AnimationEnd', doSomething)
}
prefixedEvent.add(el, 'AnimationEnd', doSomething )
- Uses browserify
- Uses
testem
make test