PageSourceSearch

http://www.dfwweightlosssurgery.com/wp-content/themes/rm-basetheme/js/libs/blazy/polyfills/closest.js?ver=1.0

js dfwweightlosssurgery.com collected 2026-10-04 21:11:40 UTC 1,072 bytes, 29 lines download raw bytes

vendor: 1,072 bytes, lines 1-29
1// Polyfill for Element.closest that falls back to Element.matches that falls back to querySelectorAll
2// Created for blazy.js 1.8.1 - https://github.com/dinbror/blazy to ensure IE7+ support
3
4
5(function () {
6    if (!Element.prototype.matches) {
7    Element.prototype.matches = 
8        Element.prototype.matchesSelector || 
9        Element.prototype.mozMatchesSelector ||
10        Element.prototype.msMatchesSelector || 
11        Element.prototype.oMatchesSelector || 
12        Element.prototype.webkitMatchesSelector ||
13        function(s) {
14            var matches = (this.document || this.ownerDocument).querySelectorAll(s),
15                i = matches.length;
16            while (--i >= 0 && matches.item(i) !== this) {}
17            return i > -1;            
18        };
19	}
20
21	if (!Element.prototype.closest) {
22		Element.prototype.closest = Element.prototype.closest ||
23		function(selector) {
24			var element = this;
25	        while (element.matches && !element.matches(selector)) element = element.parentNode;
26	        return element.matches ? element : null;
27		};
28	}
29})();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.