First upload

This commit is contained in:
2024-09-18 16:47:42 +02:00
commit 786dd08043
5614 changed files with 888234 additions and 0 deletions
@@ -0,0 +1,19 @@
export function matches(element, selector) {
var nativeMatches = element.matches
|| element.webkitMatchesSelector
|| element.msMatchesSelector;
return nativeMatches.call(element, selector);
}
export function closest(element, selector) {
if (element.closest) {
return element.closest(selector);
}
var el = element;
while (el) {
if (matches(el, selector)) {
return el;
}
el = el.parentElement;
}
return null;
}