1
0
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:
XhmikosR
2019-02-24 15:42:18 +02:00
committed by GitHub
parent 5328d0db0d
commit 5ad2121819
5 changed files with 232 additions and 242 deletions

View File

@@ -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>