File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 200
200
}
201
201
202
202
// do callback when animation start/end
203
- var isWebkit = typeof document . webkitHidden != "undefined" ;
203
+ var isWebkit = 'WebkitAppearance' in document . documentElement . style || typeof document . webkitHidden != "undefined" ;
204
204
[ "animationstart" , "animationend" ] . forEach ( function ( animationkey , index ) {
205
205
var animition = params_in [ animationkey ] , webkitkey = "webkit" + animationkey . replace ( / ^ a | s | e / g, function ( matchs ) {
206
206
return matchs . toUpperCase ( ) ;
207
207
} ) ;
208
-
209
208
if ( ! store [ pageid ] ) {
209
+ var animateEventName = isWebkit ? webkitkey : animationkey ;
210
210
if ( typeof animition == "string" && params_in . root [ animition ] ) {
211
- pageInto . addEventListener ( isWebkit ? webkitkey : animationkey , function ( ) {
211
+ pageInto . addEventListener ( animateEventName , function ( ) {
212
212
params_in . root [ animition ] ( this , this . classList . contains ( "in" ) ? "into" : "out" ) ;
213
213
} ) ;
214
214
} else if ( typeof animition == "function" ) {
215
- pageInto . addEventListener ( isWebkit ? webkitkey : animationkey , function ( ) {
215
+ pageInto . addEventListener ( animateEventName , function ( ) {
216
216
animition ( this , this . classList . contains ( "in" ) ? "into" : "out" ) ;
217
217
} ) ;
218
218
}
You can’t perform that action at this time.
0 commit comments