Przeglądaj źródła

use addEventListener

Former-commit-id: 5c9929fd8bd98fef650dd23d08c7a2e417e2ded7
Gildas 5 lat temu
rodzic
commit
bbd76454b2
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      extension/core/content/content-bootstrap.js

+ 1 - 1
extension/core/content/content-bootstrap.js

@@ -82,7 +82,7 @@ this.singlefile.extension.core.content.bootstrap = this.singlefile.extension.cor
 	async function initAutoSavePage(message) {
 		options = message.options;
 		if (document.readyState != "complete") {
-			await new Promise(resolve => window.onload = resolve);
+			await new Promise(resolve => window.addEventListener("load", resolve));
 		}
 		await autoSavePage();
 		if (options.autoSaveRepeat) {