nl_tokens: set animation callback as a method
pl_tokens: function ( page , data ) { if ( <mask> . flagAniBind == true ) return ; // do callback when animation start/end [ "animationstart" , "animationend" ] . forEach ( function ( animationkey , index ) { var animition = paramsIn [ animationkey ] , webkitkey = "webkit" + animationkey . replace ( / ^a|s|e / g , function ( matchs ) { return matchs . toUpperCase ( ) ; } ) ; var animateEventName = isWebkit ? webkitkey : animationkey ; // if it's the out element, hide it when 'animationend' if ( index ) { page . addEventListener ( animateEventName , function ( ) { if ( this . classList . contains ( "in" ) == false ) { this . style . display = "none" ; // add on v2.5.5 // move here on v2.5.8 // main for remove page is just current page // remove on v2.7.0 // if (this.removeSelf == true) { // 	this.parentElement.removeChild(this); // 	this.removeSelf = null; // } } this . classList . remove ( params ( this ) . form ) ; } ) ; } // bind animation events if ( typeof animition == "string" && paramsIn . root [ animition ] ) { page . addEventListener ( animateEventName , function ( ) { data . root [ animition ] . call ( data . root , this , this . classList . contains ( "in" ) ? "into" : "out" , options ) ; } ) ; } else if ( typeof animition == "function" ) { page . addEventListener ( animateEventName , function ( ) { animition . call ( data . root , this , this . classList . contains ( "in" ) ? "into" : "out" , options ) ; } ) ; } // set a flag page . flagAniBind = true ; } ) ; }