0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-01 13:24:25 +01:00

event-handler.js: use for...of

This commit is contained in:
XhmikosR 2021-10-29 10:38:52 +03:00
parent 62d86c07f8
commit b5147ec218

View File

@ -104,8 +104,8 @@ function bootstrapDelegationHandler(element, selector, fn) {
const domElements = element.querySelectorAll(selector)
for (let { target } = event; target && target !== this; target = target.parentNode) {
for (let i = domElements.length; i--;) {
if (domElements[i] === target) {
for (const domElement of domElements) {
if (domElement === target) {
event.delegateTarget = target
if (handler.oneOff) {