using for loop instead of forEach in element classlists
pick #64 and close #68
This commit is contained in:
@@ -183,11 +183,13 @@ export function _isBlockedElement(
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
element.classList.forEach((className) => {
|
||||
// tslint:disable-next-line: prefer-for-of
|
||||
for (let eIndex = 0; eIndex < element.classList.length; eIndex++) {
|
||||
const className = element.classList[eIndex];
|
||||
if (blockClass.test(className)) {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
if (blockSelector) {
|
||||
return element.matches(blockSelector);
|
||||
|
||||
Reference in New Issue
Block a user