Fix prototype used for selector matcher function
This commit is contained in:
parent
84eef1d747
commit
c7bf0c5c03
@ -221,7 +221,7 @@ export function hasClass(element, className) {
|
||||
|
||||
// Element matches selector
|
||||
export function matches(element, selector) {
|
||||
const prototype = { Element };
|
||||
const prototype = Element.prototype;
|
||||
|
||||
function match() {
|
||||
return Array.from(document.querySelectorAll(selector)).includes(this);
|
||||
|
Loading…
x
Reference in New Issue
Block a user