Improve preview error messages

This commit is contained in:
Thomas Weber committed 2021-08-28 17:49:22 -05:00
1 parent bbc09e748b
commit cb078708c4
1 file changed
+2 -2
+2 -2
View File
@@ -55,7 +55,7 @@ const source = `<!DOCTYPE html>
document.querySelector(".preview-error-message").textContent = "Error: " + message;
};
if (!window.opener) {
err("window.opener is missing");
err("Can't communicate with main page.");
return;
}
let hasRun = false;
@@ -73,7 +73,7 @@ const source = `<!DOCTYPE html>
document.close(); // fixes poor performance in firefox
};
fr.onerror = () => {
err("Something went wrong reading the file");
err("Something went wrong reading the file: " + fr.error);
};
fr.readAsText(e.data.blob);
}