which-transition-end-event
v0.1.0
Published
returns the browser transition end event name and caches it for future use
Downloads
13
Readme
which-transition-end-event
returns the browser transition end event name and caches it for future use
table of contents
installation
npm install dan-nl/which-transition-end-event
usage
default
var whichTransitionEndEvent = require( 'which-transition-end-event' );
var elm = document.getElementById( 'my-elm' );
function eventHandler( evt ) {
console.log( evt );
}
elm.addEventListener( whichTransitionEndEvent(), eventHandler );
clear cache
var whichTransitionEndEvent = require( 'which-transition-end-event' );
var elm = document.getElementById( 'my-elm' );
function eventHandler( evt ) {
console.log( evt );
}
elm.addEventListener( whichTransitionEndEvent( true ), eventHandler );