/var/www/vhosts/ihelp.ro/httpdocs/vendor/twbs/bootstrap/js/src/util
NameSizeModeActions
backdrop.js31250644editdlrm
component-functions.js11140644editdlrm
config.js17840644editdlrm
focustrap.js25180644editdlrm
index.js76400644editdlrm
sanitizer.js29330644editdlrm
scrollbar.js37540644editdlrm
swipe.js34090644editdlrm
template-factory.js36120644editdlrm
Edit: /var/www/vhosts/ihelp.ro/httpdocs/vendor/twbs/bootstrap/js/src/util/component-functions.js (1114B)
/** * -------------------------------------------------------------------------- * Bootstrap util/component-functions.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ import EventHandler from '../dom/event-handler.js' import SelectorEngine from '../dom/selector-engine.js' import { isDisabled } from './index.js' const enableDismissTrigger = (component, method = 'hide') => { const clickEvent = `click.dismiss${component.EVENT_KEY}` const name = component.NAME EventHandler.on(document, clickEvent, `[data-bs-dismiss="${name}"]`, function (event) { if (['A', 'AREA'].includes(this.tagName)) { event.preventDefault() } if (isDisabled(this)) { return } const target = SelectorEngine.getElementFromSelector(this) || this.closest(`.${name}`) const instance = component.getOrCreateInstance(target) // Method argument is left, for Alert and only, as it doesn't implement the 'hide' method instance[method]() }) } export { enableDismissTrigger }