domquery-com 1.0.3 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/domquery.js +2298 -2230
- package/domquery.min.js +297 -295
- package/package.json +1 -1
- package/src/lazyLoadImages.js +253 -145
- package/src/select.js +1406 -1367
- package/src_min/lazyLoadImages.min.js +17 -13
- package/src_min/select.min.js +180 -177
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "domquery-com",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "A modern JavaScript library that integrates all features needed for web app development. Optimized for hybrid app/WebView environments.",
|
|
5
5
|
"main": "domquery.js",
|
|
6
6
|
"module": "domquery.js",
|
package/src/lazyLoadImages.js
CHANGED
|
@@ -1,38 +1,91 @@
|
|
|
1
|
-
$.lazyLoadImages = function(
|
|
1
|
+
$.lazyLoadImages = function(h, p, r) {
|
|
2
2
|
if (!this.elements || !Array.isArray(this.elements)) throw Error("lazyLoadImages.js requires domquery.js (this.elements is required)");
|
|
3
|
-
if ("object" === typeof
|
|
4
|
-
const a =
|
|
5
|
-
|
|
3
|
+
if ("object" === typeof h && h.simply) {
|
|
4
|
+
const a = h.selector || "[data-src]";
|
|
5
|
+
let b;
|
|
6
|
+
if (1 === this.elements.length && this.elements[0] === document) b = document.querySelectorAll(a);
|
|
6
7
|
else {
|
|
7
8
|
const c = new Set;
|
|
8
|
-
this.elements.forEach(
|
|
9
|
-
|
|
9
|
+
this.elements.forEach(e => {
|
|
10
|
+
e.querySelectorAll(a).forEach(k => c.add(k))
|
|
10
11
|
});
|
|
11
|
-
|
|
12
|
+
b = Array.from(c)
|
|
13
|
+
}
|
|
14
|
+
const d = c => {
|
|
15
|
+
const e = c.dataset.src;
|
|
16
|
+
e && ("img" === c.tagName.toLowerCase() ?
|
|
17
|
+
(c.src = e, c.alt = c.alt || "") : c.style.backgroundImage = `url(${e})`, c.removeAttribute("data-src"))
|
|
18
|
+
},
|
|
19
|
+
f = (c, e = 50) => {
|
|
20
|
+
c = c.getBoundingClientRect();
|
|
21
|
+
return c.top >= -e && c.left >= -e && c.bottom <= (window.innerHeight || document.documentElement.clientHeight) + e && c.right <= (window.innerWidth || document.documentElement.clientWidth) + e
|
|
22
|
+
};
|
|
23
|
+
if ("undefined" !== typeof IntersectionObserver) {
|
|
24
|
+
const c = new IntersectionObserver((e, k) => {
|
|
25
|
+
e.forEach(l => {
|
|
26
|
+
l.isIntersecting && (d(l.target), k.unobserve(l.target))
|
|
27
|
+
})
|
|
28
|
+
}, {
|
|
29
|
+
threshold: .1,
|
|
30
|
+
rootMargin: "50px"
|
|
31
|
+
});
|
|
32
|
+
b.forEach(e =>
|
|
33
|
+
c.observe(e));
|
|
34
|
+
this.destroy = function() {
|
|
35
|
+
c.disconnect();
|
|
36
|
+
return this
|
|
37
|
+
}
|
|
38
|
+
} else {
|
|
39
|
+
const c = () => {
|
|
40
|
+
b = b.filter(m => m.dataset.src);
|
|
41
|
+
0 === b.length ? (window.removeEventListener("scroll", k, l ? {
|
|
42
|
+
passive: !0
|
|
43
|
+
} : !1), window.removeEventListener("resize", k, l ? {
|
|
44
|
+
passive: !0
|
|
45
|
+
} : !1)) : b.forEach(m => {
|
|
46
|
+
m.dataset.src && f(m, 50) && d(m)
|
|
47
|
+
})
|
|
48
|
+
};
|
|
49
|
+
c();
|
|
50
|
+
let e;
|
|
51
|
+
const k = () => {
|
|
52
|
+
e && clearTimeout(e);
|
|
53
|
+
e = setTimeout(c, 100)
|
|
54
|
+
},
|
|
55
|
+
l = function() {
|
|
56
|
+
let m = !1;
|
|
57
|
+
try {
|
|
58
|
+
const q = Object.defineProperty({}, "passive", {
|
|
59
|
+
get: function() {
|
|
60
|
+
m = !0
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
window.addEventListener("test", null, q);
|
|
64
|
+
window.removeEventListener("test",
|
|
65
|
+
null, q)
|
|
66
|
+
} catch (q) {}
|
|
67
|
+
return m
|
|
68
|
+
}();
|
|
69
|
+
window.addEventListener("scroll", k, l ? {
|
|
70
|
+
passive: !0
|
|
71
|
+
} : !1);
|
|
72
|
+
window.addEventListener("resize", k, l ? {
|
|
73
|
+
passive: !0
|
|
74
|
+
} : !1);
|
|
75
|
+
this.destroy = function() {
|
|
76
|
+
window.removeEventListener("scroll", k, l ? {
|
|
77
|
+
passive: !0
|
|
78
|
+
} : !1);
|
|
79
|
+
window.removeEventListener("resize", k, l ? {
|
|
80
|
+
passive: !0
|
|
81
|
+
} : !1);
|
|
82
|
+
e && (clearTimeout(e), e = null);
|
|
83
|
+
return this
|
|
84
|
+
}
|
|
12
85
|
}
|
|
13
|
-
const d = new IntersectionObserver((c, b) => {
|
|
14
|
-
c.forEach(e => {
|
|
15
|
-
if (e.isIntersecting) {
|
|
16
|
-
e =
|
|
17
|
-
e.target;
|
|
18
|
-
const l = e.dataset.src;
|
|
19
|
-
"img" === e.tagName.toLowerCase() ? (e.src = l, e.alt = e.alt || "") : e.style.backgroundImage = `url(${l})`;
|
|
20
|
-
e.removeAttribute("data-src");
|
|
21
|
-
b.unobserve(e)
|
|
22
|
-
}
|
|
23
|
-
})
|
|
24
|
-
}, {
|
|
25
|
-
threshold: .1,
|
|
26
|
-
rootMargin: "50px"
|
|
27
|
-
});
|
|
28
|
-
g.forEach(c => d.observe(c));
|
|
29
|
-
this.destroy = function() {
|
|
30
|
-
d.disconnect();
|
|
31
|
-
return this
|
|
32
|
-
};
|
|
33
86
|
return this
|
|
34
87
|
}
|
|
35
|
-
const
|
|
88
|
+
const w = {
|
|
36
89
|
duration: 0,
|
|
37
90
|
threshold: .1,
|
|
38
91
|
rootMargin: "50px",
|
|
@@ -43,160 +96,215 @@ $.lazyLoadImages = function(g, k, p) {
|
|
|
43
96
|
removeLoading: !0,
|
|
44
97
|
placeholder: !1
|
|
45
98
|
};
|
|
46
|
-
let
|
|
47
|
-
...
|
|
99
|
+
let g = {
|
|
100
|
+
...w
|
|
48
101
|
},
|
|
49
|
-
|
|
50
|
-
"function" === typeof
|
|
51
|
-
typeof
|
|
52
|
-
...
|
|
53
|
-
...
|
|
102
|
+
t = null;
|
|
103
|
+
"function" === typeof h ?
|
|
104
|
+
g.callback = h : "number" === typeof h ? (g.duration = h, g.callback = p) : "string" === typeof h ? (t = h, "function" === typeof p ? g.callback = p : "number" === typeof p && (g.duration = p, g.callback = r)) : "object" === typeof h && (g = {
|
|
105
|
+
...w,
|
|
106
|
+
...h
|
|
54
107
|
});
|
|
55
|
-
|
|
108
|
+
let n;
|
|
109
|
+
if (1 === this.elements.length && this.elements[0] === document) n = Array.from(document.querySelectorAll(t || "[data-src]"));
|
|
56
110
|
else {
|
|
57
111
|
const a = new Set;
|
|
58
|
-
this.elements.forEach(
|
|
59
|
-
|
|
112
|
+
this.elements.forEach(b => {
|
|
113
|
+
b.querySelectorAll(t || "[data-src]").forEach(d => a.add(d))
|
|
60
114
|
});
|
|
61
|
-
|
|
115
|
+
n = Array.from(a)
|
|
62
116
|
}
|
|
63
|
-
document.getElementById("lazy-loading-styles") || (
|
|
64
|
-
|
|
65
|
-
document.head.appendChild(
|
|
66
|
-
|
|
67
|
-
"img" === a.tagName.toLowerCase() && a.dataset.src && (
|
|
117
|
+
document.getElementById("lazy-loading-styles") || (h =
|
|
118
|
+
document.createElement("style"), h.id = "lazy-loading-styles", h.textContent = "\n .lazy-loading-wrap {\n position: absolute !important;\n top: 0 !important;\n left: 0 !important;\n width: 100% !important;\n height: 100% !important;\n z-index: 9998 !important;\n pointer-events: none !important;\n overflow: visible !important;\n background-color: rgba(255, 255, 255, 0.5) !important;\n backdrop-filter: blur(3px) !important;\n transition: opacity 0.2s ease !important;\n }\n .lazy-loading-indicator {\n position: absolute !important;\n top: 50% !important;\n left: 50% !important;\n transform: translate(-50%, -50%) !important;\n width: 60px !important;\n height: 30px !important;\n z-index: 9999 !important;\n pointer-events: none !important;\n display: flex !important;\n justify-content: center !important;\n align-items: center !important;\n }\n .lazy-loading-dot {\n width: 8px !important;\n height: 8px !important;\n margin: 0 3px !important;\n border-radius: 50% !important;\n background-color: rgba(0, 0, 0, 0.5) !important;\n display: inline-block !important;\n animation: lazyPulse 1.4s infinite ease-in-out !important;\n }\n .lazy-loading-dot:nth-child(1) { animation-delay: 0s !important; }\n .lazy-loading-dot:nth-child(2) { animation-delay: 0.2s !important; }\n .lazy-loading-dot:nth-child(3) { animation-delay: 0.4s !important; }\n @keyframes lazyPulse {\n 0%, 100% { transform: scale(0.6); opacity: 0.6; }\n 50% { transform: scale(1); opacity: 1; }\n }\n .lazy-loading-progress {\n position: absolute !important;\n bottom: 0 !important;\n left: 0 !important;\n height: 3px !important;\n width: 0% !important;\n background: linear-gradient(to right, #4facfe, #00f2fe) !important;\n transition: width 0.3s ease !important;\n z-index: 9999 !important;\n box-shadow: 0 0 5px rgba(79, 172, 254, 0.5) !important;\n }\n .lazy-placeholder {\n background-color: #f0f0f0 !important;\n background-image: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%) !important;\n background-size: 200% 100% !important;\n animation: shimmer 1.5s infinite !important;\n }\n @keyframes shimmer {\n 0% { background-position: 200% 0; }\n 100% { background-position: -200% 0; }\n }\n ",
|
|
119
|
+
document.head.appendChild(h));
|
|
120
|
+
n.forEach(a => {
|
|
121
|
+
"img" === a.tagName.toLowerCase() && a.dataset.src && (g.placeholder && a.classList.add("lazy-placeholder"), a.src && "" !== a.src && a.src !== window.location.href || (a.src = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'/%3E"), 0 < g.duration && (a.style.opacity = "0"))
|
|
68
122
|
});
|
|
69
|
-
const
|
|
70
|
-
let
|
|
71
|
-
return (...
|
|
72
|
-
clearTimeout(
|
|
73
|
-
|
|
123
|
+
const A = (a, b) => {
|
|
124
|
+
let d;
|
|
125
|
+
return (...f) => {
|
|
126
|
+
clearTimeout(d);
|
|
127
|
+
d = setTimeout(() => a(...f), b)
|
|
74
128
|
}
|
|
75
129
|
},
|
|
76
|
-
|
|
77
|
-
var
|
|
78
|
-
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
-
var
|
|
82
|
-
|
|
83
|
-
"string" === typeof
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
let
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
95 <
|
|
92
|
-
|
|
130
|
+
x = a => {
|
|
131
|
+
var b = window.getComputedStyle(a).position,
|
|
132
|
+
d = "img" === a.tagName.toLowerCase();
|
|
133
|
+
const f = document.createElement("div");
|
|
134
|
+
f.className = "lazy-loading-wrap";
|
|
135
|
+
var c = document.createElement("div");
|
|
136
|
+
c.className = "lazy-loading-indicator";
|
|
137
|
+
"string" === typeof g.loading ? (c.innerHTML = g.loading, c.style.color = "rgba(0, 0, 0, 0.7)", c.style.fontSize = "14px", c.style.whiteSpace = "nowrap") : c.innerHTML = '<div class="lazy-loading-dot"></div><div class="lazy-loading-dot"></div><div class="lazy-loading-dot"></div>';
|
|
138
|
+
const e = document.createElement("div");
|
|
139
|
+
e.className = "lazy-loading-progress";
|
|
140
|
+
f.appendChild(c);
|
|
141
|
+
f.appendChild(e);
|
|
142
|
+
let k = 0;
|
|
143
|
+
const l = setInterval(() => {
|
|
144
|
+
k += 5 * Math.random();
|
|
145
|
+
95 < k && (clearInterval(l), k = 95);
|
|
146
|
+
e.style.width = k + "%"
|
|
93
147
|
}, 200);
|
|
94
|
-
|
|
148
|
+
c = {
|
|
95
149
|
element: a,
|
|
96
|
-
wrapper:
|
|
97
|
-
indicator:
|
|
98
|
-
originalPosition:
|
|
99
|
-
progressBar:
|
|
100
|
-
progressInterval:
|
|
150
|
+
wrapper: f,
|
|
151
|
+
indicator: c,
|
|
152
|
+
originalPosition: b,
|
|
153
|
+
progressBar: e,
|
|
154
|
+
progressInterval: l
|
|
101
155
|
};
|
|
102
|
-
if (
|
|
103
|
-
if (
|
|
156
|
+
if (d)
|
|
157
|
+
if (b = a.parentNode, "absolute" === window.getComputedStyle(a).position) "static" === window.getComputedStyle(b).position && (b.style.position = "relative"), b.appendChild(f);
|
|
104
158
|
else {
|
|
105
|
-
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
typeof
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
159
|
+
d = document.createElement("div");
|
|
160
|
+
const m = a.offsetWidth || b.offsetWidth || "100%",
|
|
161
|
+
q = a.offsetHeight || b.offsetHeight || "auto";
|
|
162
|
+
d.style.cssText = `position: relative; display: inline-block; width: ${"number"===
|
|
163
|
+
typeof m?m+"px":m}; height: ${"number"===typeof q?q+"px":q}; overflow: hidden;`;
|
|
164
|
+
b.insertBefore(d, a);
|
|
165
|
+
d.appendChild(a);
|
|
166
|
+
d.appendChild(f);
|
|
167
|
+
c.container = d
|
|
114
168
|
}
|
|
115
|
-
else "static" ===
|
|
116
|
-
return
|
|
169
|
+
else "static" === b && (a.style.position = "relative"), a.appendChild(f);
|
|
170
|
+
return c
|
|
117
171
|
},
|
|
118
|
-
|
|
172
|
+
u = a => {
|
|
119
173
|
a && (a.progressInterval && (clearInterval(a.progressInterval), a.progressBar && (a.progressBar.style.width = "100%")), a.wrapper?.parentNode && (a.wrapper.style.opacity = "0", setTimeout(() => {
|
|
120
174
|
a.wrapper?.parentNode?.removeChild(a.wrapper)
|
|
121
175
|
}, 200)), a.container?.parentNode && setTimeout(() => {
|
|
122
176
|
const {
|
|
123
|
-
element:
|
|
124
|
-
container:
|
|
177
|
+
element: b,
|
|
178
|
+
container: d
|
|
125
179
|
} = a;
|
|
126
|
-
|
|
127
|
-
|
|
180
|
+
d.parentNode.insertBefore(b, d);
|
|
181
|
+
d.parentNode.removeChild(d)
|
|
128
182
|
}, 200), a.element && "static" === a.originalPosition && setTimeout(() => {
|
|
129
183
|
a.element.style.position = "static"
|
|
130
|
-
}, 200), a.element &&
|
|
184
|
+
}, 200), a.element && g.placeholder && a.element.classList.remove("lazy-placeholder"))
|
|
131
185
|
},
|
|
132
|
-
|
|
186
|
+
y = a => {
|
|
133
187
|
if ("img" === a.tagName.toLowerCase()) {
|
|
134
|
-
var
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
188
|
+
var b = a.getAttribute("width"),
|
|
189
|
+
d = a.getAttribute("height");
|
|
190
|
+
b && d ? a.style.aspectRatio = b / d : (b = a.offsetWidth, d = a.offsetHeight, 0 < b && 0 < d ? a.style.aspectRatio = b / d : a.style.minHeight = 0 < b ? .5625 * b + "px" : "200px");
|
|
191
|
+
g.placeholder &&
|
|
138
192
|
a.classList.add("lazy-placeholder")
|
|
139
|
-
} else 50 > a.offsetHeight && (
|
|
193
|
+
} else 50 > a.offsetHeight && (b = a.offsetWidth, a.style.minHeight = 0 < b ? .5625 * b + "px" : "200px"), !g.placeholder || a.style.backgroundColor && "transparent" !== a.style.backgroundColor || a.classList.add("lazy-placeholder")
|
|
140
194
|
},
|
|
141
|
-
|
|
142
|
-
const
|
|
195
|
+
v = (a, b, d = 0, f = null) => {
|
|
196
|
+
const c = new Image;
|
|
143
197
|
a.tagName.toLowerCase();
|
|
144
|
-
|
|
145
|
-
0 <
|
|
198
|
+
c.onload = A(() => {
|
|
199
|
+
0 < g.duration ? (a.style.transition = `opacity ${g.duration}ms ease-in`, requestAnimationFrame(() => {
|
|
146
200
|
requestAnimationFrame(() => {
|
|
147
201
|
a.style.opacity = "1";
|
|
148
|
-
|
|
202
|
+
f && setTimeout(() => u(f), g.duration)
|
|
149
203
|
})
|
|
150
204
|
})) : (a.style.opacity =
|
|
151
|
-
"1",
|
|
152
|
-
|
|
205
|
+
"1", f && u(f));
|
|
206
|
+
g.callback && g.callback(b, null, a)
|
|
153
207
|
}, 50);
|
|
154
|
-
|
|
155
|
-
|
|
208
|
+
c.onerror = () => {
|
|
209
|
+
d < g.maxRetries ? setTimeout(() => v(a, b, d + 1, f), g.retryDelay) : (a.style.opacity = "1", f && u(f), g.callback && g.callback(b, Error("Failed to load image after retries"), a))
|
|
156
210
|
};
|
|
157
|
-
|
|
211
|
+
c.src = b
|
|
158
212
|
},
|
|
159
|
-
|
|
160
|
-
a.
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
213
|
+
B = (a, b = 50) => {
|
|
214
|
+
a = a.getBoundingClientRect();
|
|
215
|
+
return a.top >= -b && a.left >= -b && a.bottom <= (window.innerHeight || document.documentElement.clientHeight) + b && a.right <= (window.innerWidth || document.documentElement.clientWidth) + b
|
|
216
|
+
},
|
|
217
|
+
z = a => {
|
|
218
|
+
const b = a.dataset.src;
|
|
219
|
+
if (b)
|
|
220
|
+
if ("img" === a.tagName.toLowerCase()) {
|
|
221
|
+
y(a);
|
|
222
|
+
const f = g.loading ? x(a) : null;
|
|
223
|
+
0 < g.duration && (a.style.opacity = "0");
|
|
224
|
+
const c = new Image;
|
|
225
|
+
var d = a.parentElement;
|
|
226
|
+
const e = d && 0 < parseFloat(window.getComputedStyle(d).paddingTop);
|
|
227
|
+
d = () => {
|
|
228
|
+
if (c.naturalWidth && c.naturalHeight) {
|
|
229
|
+
const k = window.getComputedStyle(a);
|
|
230
|
+
e || k.aspectRatio || a.style.aspectRatio || a.style.width || a.style.height || a.hasAttribute("width") || a.hasAttribute("height") || (a.style.aspectRatio = `${c.naturalWidth} / ${c.naturalHeight}`);
|
|
231
|
+
e && (a.style.minHeight = "0", a.style.height = "100%", a.style.width = "100%")
|
|
232
|
+
}
|
|
233
|
+
a.src =
|
|
234
|
+
b;
|
|
235
|
+
a.alt = a.alt || "";
|
|
236
|
+
a.removeAttribute("data-src");
|
|
237
|
+
v(a, b, 0, f)
|
|
238
|
+
};
|
|
239
|
+
c.onload = d;
|
|
240
|
+
c.onerror = d;
|
|
241
|
+
c.src = b
|
|
242
|
+
} else y(a), d = g.loading ? x(a) : null, 0 < g.duration && (a.style.opacity = "0"), a.style.backgroundImage = `url(${b})`, a.removeAttribute("data-src"), v(a, b, 0, d)
|
|
243
|
+
};
|
|
244
|
+
if ("undefined" !== typeof IntersectionObserver) {
|
|
245
|
+
const a = new IntersectionObserver((b, d) => {
|
|
246
|
+
b.forEach(f => {
|
|
247
|
+
f.isIntersecting && (z(f.target), d.unobserve(f.target))
|
|
188
248
|
})
|
|
189
249
|
}, {
|
|
190
|
-
threshold:
|
|
191
|
-
rootMargin:
|
|
250
|
+
threshold: g.threshold,
|
|
251
|
+
rootMargin: g.rootMargin
|
|
192
252
|
});
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
253
|
+
n.forEach(b => a.observe(b));
|
|
254
|
+
this.destroy = function() {
|
|
255
|
+
a.disconnect();
|
|
256
|
+
return this
|
|
257
|
+
}
|
|
258
|
+
} else {
|
|
259
|
+
const a = () => {
|
|
260
|
+
n = n.filter(c => c.dataset.src);
|
|
261
|
+
0 === n.length ? (window.removeEventListener("scroll", d, f ? {
|
|
262
|
+
passive: !0
|
|
263
|
+
} : !1), window.removeEventListener("resize", d, f ? {
|
|
264
|
+
passive: !0
|
|
265
|
+
} : !1)) : n.forEach(c => {
|
|
266
|
+
c.dataset.src && B(c, 50) && z(c)
|
|
267
|
+
})
|
|
268
|
+
};
|
|
269
|
+
a();
|
|
270
|
+
let b;
|
|
271
|
+
const d = () => {
|
|
272
|
+
b && clearTimeout(b);
|
|
273
|
+
b = setTimeout(a, 100)
|
|
274
|
+
},
|
|
275
|
+
f = function() {
|
|
276
|
+
let c = !1;
|
|
277
|
+
try {
|
|
278
|
+
const e = Object.defineProperty({}, "passive", {
|
|
279
|
+
get: function() {
|
|
280
|
+
c = !0
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
window.addEventListener("test", null, e);
|
|
284
|
+
window.removeEventListener("test", null, e)
|
|
285
|
+
} catch (e) {}
|
|
286
|
+
return c
|
|
287
|
+
}();
|
|
288
|
+
window.addEventListener("scroll",
|
|
289
|
+
d, f ? {
|
|
290
|
+
passive: !0
|
|
291
|
+
} : !1);
|
|
292
|
+
window.addEventListener("resize", d, f ? {
|
|
293
|
+
passive: !0
|
|
294
|
+
} : !1);
|
|
295
|
+
this.destroy = function() {
|
|
296
|
+
window.removeEventListener("scroll", d, f ? {
|
|
297
|
+
passive: !0
|
|
298
|
+
} : !1);
|
|
299
|
+
window.removeEventListener("resize", d, f ? {
|
|
300
|
+
passive: !0
|
|
301
|
+
} : !1);
|
|
302
|
+
b && (clearTimeout(b), b = null);
|
|
303
|
+
return this
|
|
304
|
+
}
|
|
305
|
+
}
|
|
198
306
|
return this
|
|
199
307
|
};
|
|
200
|
-
$.fn.lazyLoadImages = function(
|
|
201
|
-
return $.lazyLoadImages.call(this,
|
|
308
|
+
$.fn.lazyLoadImages = function(h, p, r) {
|
|
309
|
+
return $.lazyLoadImages.call(this, h, p, r)
|
|
202
310
|
};
|