Created
October 4, 2018 11:21
-
-
Save VelizarHristov/18e66fa9185b2d187783fa91f87e6927 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function animationIsInProgress () { | |
const docElement = document.body || document.documentElement | |
if (typeof docElement.style['transition'] === 'string') { | |
return true | |
} | |
const vendorSpecific = ['Moz', 'webkit', 'Webkit', 'Khtml', 'O', 'ms'] | |
for (let i = 0; i < vendorSpecific.length; i++) { | |
if (typeof docElement.style[vendorSpecific[i] + 'Transition'] === 'string') { | |
return true | |
} | |
} | |
return false | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment