Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeoSot <geo.sotis@gmail.com>2021-12-16 14:23:17 +0300
committerXhmikosR <xhmikosr@gmail.com>2022-01-30 15:15:17 +0300
commitfa939951232b7066722e928b370fd5e56b373fba (patch)
tree5a38426f71a015c7f46defc0333aba2165b5aa4d /js/tests/unit/offcanvas.spec.js
parent640542e6060c365c2e9cad7543822cf3d83045ae (diff)
Event handler: replace deprecated `initEvent`
Diffstat (limited to 'js/tests/unit/offcanvas.spec.js')
-rw-r--r--js/tests/unit/offcanvas.spec.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/js/tests/unit/offcanvas.spec.js b/js/tests/unit/offcanvas.spec.js
index f87527fb2f..36ef45dceb 100644
--- a/js/tests/unit/offcanvas.spec.js
+++ b/js/tests/unit/offcanvas.spec.js
@@ -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', () => {