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:
@@ -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>
|
||||
|
Reference in New Issue
Block a user