|
|
@@ -38,7 +38,7 @@ this.singlefile.lib.processors.lazy.content.loader = this.singlefile.lib.process
|
|
|
const removeEventListener = window.removeEventListener;
|
|
|
|
|
|
return {
|
|
|
- process: options => {
|
|
|
+ process: async options => {
|
|
|
const maxScrollY = Math.max(document.documentElement.scrollHeight - (document.documentElement.clientHeight * 1.5), 0);
|
|
|
const maxScrollX = Math.max(document.documentElement.scrollWidth - (document.documentElement.clientWidth * 1.5), 0);
|
|
|
if (scrollY <= maxScrollY && scrollX <= maxScrollX) {
|
|
|
@@ -116,7 +116,7 @@ this.singlefile.lib.processors.lazy.content.loader = this.singlefile.lib.process
|
|
|
return setAsyncTimeout(() => lazyLoadEnd(idleTimeoutId, observer, options, resolve), options.loadDeferredImagesMaxIdleTime);
|
|
|
}
|
|
|
|
|
|
- function deferForceLazyLoadEnd(timeoutId, idleTimeoutId, maxTimeoutId, observer, options, resolve) {
|
|
|
+ async function deferForceLazyLoadEnd(timeoutId, idleTimeoutId, maxTimeoutId, observer, options, resolve) {
|
|
|
clearAsyncTimeout(maxTimeoutId);
|
|
|
return setAsyncTimeout(() => {
|
|
|
clearAsyncTimeout(timeoutId);
|