0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-02 14:24:19 +01:00

Use only transitionend event (#24962)

This commit is contained in:
Mr_Green 2017-12-07 16:40:18 +05:30 committed by Johann-S
parent af34799eda
commit 9d373d7112

View File

@ -20,11 +20,6 @@ const Util = (($) => {
const MAX_UID = 1000000 const MAX_UID = 1000000
const TransitionEndEvent = {
WebkitTransition : 'webkitTransitionEnd',
transition : 'transitionend'
}
// shoutout AngusCroll (https://goo.gl/pxwQGp) // shoutout AngusCroll (https://goo.gl/pxwQGp)
function toType(obj) { function toType(obj) {
return {}.toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase() return {}.toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase()
@ -48,17 +43,9 @@ const Util = (($) => {
return false return false
} }
const el = document.createElement('bootstrap') return {
end: 'transitionend'
for (const name in TransitionEndEvent) {
if (typeof el.style[name] !== 'undefined') {
return {
end: TransitionEndEvent[name]
}
}
} }
return false
} }
function transitionEndEmulator(duration) { function transitionEndEmulator(duration) {