Left: | ||
Right: |
OLD | NEW |
---|---|
(Empty) | |
1 {"version":3,"names":[],"mappings":"","sources":["element-closest.js"],"sourcesC ontent":["/*! @source https://github.com/jonathantneal/closest/blob/master/eleme nt-closest.js */\n\n(function (ElementProto) {\n\tif (typeof ElementProto.matche s !== 'function') {\n\t\tElementProto.matches = ElementProto.msMatchesSelector | | ElementProto.mozMatchesSelector || ElementProto.webkitMatchesSelector || funct ion matches(selector) {\n\t\t\tvar element = this;\n\t\t\tvar elements = (elemen t.document || element.ownerDocument).querySelectorAll(selector);\n\t\t\tvar inde x = 0;\n\n\t\t\twhile (elements[index] && elements[index] !== element) {\n\t\t\t \t++index;\n\t\t\t}\n\n\t\t\treturn Boolean(elements[index]);\n\t\t};\n\t}\n\n\t if (typeof ElementProto.closest !== 'function') {\n\t\tElementProto.closest = fu nction closest(selector) {\n\t\t\tvar element = this;\n\n\t\t\twhile (element && element.nodeType === 1) {\n\t\t\t\tif (element.matches(selector)) {\n\t\t\t\t\t return element;\n\t\t\t\t}\n\n\t\t\t\telement = element.parentNode;\n\t\t\t}\n\n \t\t\treturn null;\n\t\t};\n\t}\n})(window.Element.prototype);"],"file":"element -closest.js"} | |
OLD | NEW |