1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-20 20:31:26 +02:00

Use es6 on visual tests (#36915)

This commit is contained in:
GeoSot
2022-09-22 01:48:23 +03:00
committed by GitHub
parent 37e2e7e124
commit 27f20257eb
4 changed files with 30 additions and 51 deletions

View File

@@ -47,17 +47,17 @@
<script src="../../../dist/js/bootstrap.bundle.js"></script>
<script>
var t0
var t1
var carousel = document.getElementById('carousel-example-generic')
let t0
let t1
const 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) {
carousel.addEventListener('slid.bs.carousel', event => {
t1 = performance.now()
console.log('transition-duration took ' + (t1 - t0) + 'ms, slid at ' + event.timeStamp)
})
carousel.addEventListener('slide.bs.carousel', function () {
carousel.addEventListener('slide.bs.carousel', () => {
t0 = performance.now()
})
</script>