Update std.js

This commit is contained in:
Namhyeon Go 2024-11-27 19:26:25 +09:00 committed by GitHub
parent b880e7a13d
commit ebdc212afb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -26,12 +26,12 @@ if (!Function.prototype.GetResource) {
// https://github.com/joncasey/modern-hta/blob/master/src/element-closest.js
if (Element && Element.prototype) {
if (!Element.prototype.matches) {
Element.prototype.matches = Element.prototype.msMatchesSelector
Element.prototype.matches = Element.prototype.msMatchesSelector;
}
if (!Element.prototype.closest) {
for (var p = this; p != null; p = p.parentElement) {
if (p.matches(selector)) return p
if (p.matches(selector)) return p;
}
}
}