blob: c74fc9ad074da624c5d6a17cb2c531c47148d2f8 (
plain)
1
2
3
4
5
6
7
|
/* eslint-disable */
Element.prototype.matches = Element.prototype.matches || Element.prototype.msMatches;
Element.prototype.closest = function closest(selector, selectedElement = this) {
if (!selectedElement) return;
return selectedElement.matches(selector) ? selectedElement : Element.prototype.closest(selector, selectedElement.parentElement);
};
|