An easy way to do this would be creating a global variable (string) with all transitionend events in it. And then add a eventlistener to that string. Example:
//your global var:
window.endTransition = 'webkitTransitionEnd mozTransitionEnd msTransitionEnd oTransitionEnd transitionend';
//your event
elem.addEventListener(window.endTransition, function(e){
//your awesome piece of JS
});