瀏覽代碼

add delay before revoking the Blob URI

Gildas 3 年之前
父節點
當前提交
5a5a351951
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/core/common/download.js

+ 1 - 1
src/core/common/download.js

@@ -98,7 +98,7 @@ async function downloadPageForeground(pageData) {
 		link.download = pageData.filename;
 		link.href = URL.createObjectURL(new Blob([pageData.content], { type: "text/html" }));
 		link.dispatchEvent(new MouseEvent("click"));
-		URL.revokeObjectURL(link.href);
+		setTimeout(() => URL.revokeObjectURL(link.href), 1000);
 	}
 	return new Promise(resolve => setTimeout(resolve, 1));
 }