mirror of
https://github.com/miniflux/v2.git
synced 2025-09-15 18:57:04 +00:00
Replace DomHelper.findParent with .closest
See https://developer.mozilla.org/en-US/docs/Web/API/Element/closest
This commit is contained in:
parent
d9d17f0d69
commit
826e4d654f
3 changed files with 2 additions and 12 deletions
|
@ -34,16 +34,6 @@ class DomHelper {
|
|||
return result;
|
||||
}
|
||||
|
||||
static findParent(element, selector) {
|
||||
for (; element && element !== document; element = element.parentNode) {
|
||||
if (element.classList.contains(selector)) {
|
||||
return element;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
static hasPassiveEventListenerOption() {
|
||||
var passiveSupported = false;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue