smart-admin/rc-busness/static/royalcanin-cdn-assets-new/css_js/royal-canin.utilities.closest.js
2022-01-11 11:57:54 +08:00

1 line
637 B
JavaScript

(window["RCDLjsonFunction"]=window["RCDLjsonFunction"]||[]).push([[7],{102:function(e,t,n){"use strict";n.r(t);var o=undefined;var r=RCDL.utilities.closest=function(e,t){if(!Element.prototype.matches){Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector}if(!Element.prototype.closest){Element.prototype.closest=function(e){var t=o;if(!document.documentElement.contains(t)){return null}do{if(t.matches(e)){return t}t=t.parentElement||t.parentNode}while(t!==null&&t.nodeType===1);return null}}for(;e&&e!==document;e=e.parentNode){if(e.matches(t)){return e}}return null};t["default"]=r}}]);