mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-28 23:59:53 +02:00
Remove DOMContentLoaded. (#28337)
There's no reason for us to wait here.
This commit is contained in:
@@ -54,19 +54,18 @@
|
||||
<script src="../../dist/util.js"></script>
|
||||
<script src="../../dist/carousel.js"></script>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
var t0, t1;
|
||||
var carousel = document.getElementById('carousel-example-generic')
|
||||
var t0
|
||||
var t1
|
||||
var carousel = document.getElementById('carousel-example-generic')
|
||||
|
||||
// Test to show that the carousel doesn't slide when the current tab isn't visible
|
||||
// Test to show that transition-duration can be changed with css
|
||||
carousel.addEventListener('slid.bs.carousel', function (event) {
|
||||
t1 = performance.now()
|
||||
console.log('transition-duration took ' + (t1 - t0) + 'ms, slid at ', event.timeStamp)
|
||||
})
|
||||
carousel.addEventListener('slide.bs.carousel', function () {
|
||||
t0 = performance.now()
|
||||
})
|
||||
// Test to show that the carousel doesn't slide when the current tab isn't visible
|
||||
// Test to show that transition-duration can be changed with css
|
||||
carousel.addEventListener('slid.bs.carousel', function (event) {
|
||||
t1 = performance.now()
|
||||
console.log('transition-duration took ' + (t1 - t0) + 'ms, slid at ', event.timeStamp)
|
||||
})
|
||||
carousel.addEventListener('slide.bs.carousel', function () {
|
||||
t0 = performance.now()
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
|
Reference in New Issue
Block a user