ソースを参照

use window.scrollX/Y

Gildas 5 年 前
コミット
b39614d19e

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

@@ -21,7 +21,7 @@
  *   Source.
  */
 
-/* global window, scrollY, scrollX */
+/* global window */
 
 this.singlefile.lib.processors.lazy.content.loader = this.singlefile.lib.processors.lazy.content.loader || (() => {
 
@@ -42,7 +42,7 @@ this.singlefile.lib.processors.lazy.content.loader = this.singlefile.lib.process
 			if (document.documentElement) {
 				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) {
+				if (window.scrollY <= maxScrollY && window.scrollX <= maxScrollX) {
 					return process(options);
 				}
 			}