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:
parent
62d86c07f8
commit
b5147ec218
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user