Fix prototype used for selector matcher function

This commit is contained in:
Jesper 2020-03-10 09:19:34 +01:00
parent 84eef1d747
commit c7bf0c5c03

View File

@ -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);