From 88d463aef9b74e6de637470c4c7c024e5f3ca6b9 Mon Sep 17 00:00:00 2001 From: Vladimir Kharlampidi Date: Tue, 19 Sep 2023 11:21:58 +0300 Subject: [PATCH] feat(core): make`eventPrefix` parameter default to `swiper` --- src/core/defaults.mjs | 1 + src/types/swiper-options.d.ts | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/src/core/defaults.mjs b/src/core/defaults.mjs index 23b8a1af9..3cf5ba53e 100644 --- a/src/core/defaults.mjs +++ b/src/core/defaults.mjs @@ -10,6 +10,7 @@ export default { resizeObserver: true, nested: false, createElements: false, + eventsPrefix: 'swiper', enabled: true, focusableElements: 'input, select, option, textarea, button, video, label', diff --git a/src/types/swiper-options.d.ts b/src/types/swiper-options.d.ts index 46ca6d679..53ffe720f 100644 --- a/src/types/swiper-options.d.ts +++ b/src/types/swiper-options.d.ts @@ -175,6 +175,13 @@ export interface SwiperOptions { */ createElements?: boolean; + /** + * Event name prefix for all DOM events emitted by Swiper Element (web component) + * + * @default `swiper` + */ + eventsPrefix?: boolean; + /** * CSS selector for focusable elements. Swiping will be disabled on such elements if they are "focused" *