Allow weview reload to happen

This commit is contained in:
jliddev
2022-01-11 15:42:37 -06:00
parent b473311646
commit 20dc44bc61

View File

@@ -326,7 +326,11 @@ function createWindow(): BrowserWindow {
webContents.on("will-navigate", (evt, url) => {
log.debug("[webview] will-navigate", url);
evt.preventDefault(); // block the webview from navigating at all
if (webContents.getURL() === url) {
log.debug(`[webview] reload detected`);
} else {
evt.preventDefault(); // block the webview from navigating at all
}
});
webContents.setWindowOpenHandler((details) => {