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
|
// Element matches selector
|
||||||
export function matches(element, selector) {
|
export function matches(element, selector) {
|
||||||
const prototype = { Element };
|
const prototype = Element.prototype;
|
||||||
|
|
||||||
function match() {
|
function match() {
|
||||||
return Array.from(document.querySelectorAll(selector)).includes(this);
|
return Array.from(document.querySelectorAll(selector)).includes(this);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user