UNPKG

@splidejs/splide

Version:

Splide is a lightweight, flexible and accessible slider/carousel. No dependencies, no Lighthouse errors.

15 lines (13 loc) 394 B
/** * Call the `preventDefault()` of the provided event. * * @param e - An Event object. * @param stopPropagation - Optional. Whether to stop the event propagation or not. */ export function prevent( e: Event, stopPropagation?: boolean ): void { e.preventDefault(); if ( stopPropagation ) { e.stopPropagation(); e.stopImmediatePropagation(); } }