1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-09-25 12:59:05 +02:00

Event handler: replace deprecated initEvent

This commit is contained in:
GeoSot
2021-12-16 13:23:17 +02:00
committed by XhmikosR
parent 640542e606
commit fa93995123
4 changed files with 6 additions and 15 deletions

View File

@@ -191,8 +191,7 @@ describe('Offcanvas', () => {
const offCanvasEl = fixtureEl.querySelector('div')
const offCanvas = new Offcanvas(offCanvasEl, { backdrop: true })
const clickEvent = document.createEvent('MouseEvents')
clickEvent.initEvent('mousedown', true, true)
const clickEvent = new Event('mousedown', { bubbles: true, cancelable: true })
spyOn(offCanvas._backdrop._config, 'clickCallback').and.callThrough()
offCanvasEl.addEventListener('shown.bs.offcanvas', () => {