Sfoglia il codice sorgente

revert #ef8f057

Former-commit-id: 78aaac8736c66c5f5c6b0c9ecac566cea38f24f7
Gildas 6 anni fa
parent
commit
3464374146

+ 2 - 2
lib/single-file/processors/lazy/content/content-lazy-loader.js

@@ -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);