This commit is contained in:
Mirco Wittrien 2020-04-11 21:56:29 +02:00
parent 4b54b41c96
commit e12f47245d
3 changed files with 3 additions and 3 deletions

View File

@ -3877,7 +3877,7 @@
if (typeof browserWindow.removeMenu == "function") browserWindow.removeMenu(); if (typeof browserWindow.removeMenu == "function") browserWindow.removeMenu();
else browserWindow.setMenu(null); else browserWindow.setMenu(null);
browserWindow.loadURL(url); browserWindow.loadURL(url);
browserWindow.executeJavaScriptSafe = js => {if (!browserWindow.isDestroyed()) browserWindow.webContents.executeJavaScript(js);}; browserWindow.executeJavaScriptSafe = js => {if (!browserWindow.isDestroyed()) browserWindow.webContents.executeJavaScript(`(_ => {${js}})();`);};
plugin.browserWindows.push(browserWindow); plugin.browserWindows.push(browserWindow);
return browserWindow; return browserWindow;
}; };

File diff suppressed because one or more lines are too long

View File

@ -5,7 +5,7 @@
window.respondToParent = function (data = {}) { window.respondToParent = function (data = {}) {
if (window.parent && typeof window.parent.postMessage == "function") window.parent.postMessage(data, "*"); if (window.parent && typeof window.parent.postMessage == "function") window.parent.postMessage(data, "*");
else if (data.hostId && data.hostName) { else if (data.hostId != null && data.hostName != null) {
let ipcRenderer = (require("electron") || {}).ipcRenderer; let ipcRenderer = (require("electron") || {}).ipcRenderer;
if (ipcRenderer && typeof ipcRenderer.sendTo == "function") ipcRenderer.sendTo(data.hostId, data.hostName, data); if (ipcRenderer && typeof ipcRenderer.sendTo == "function") ipcRenderer.sendTo(data.hostId, data.hostName, data);
} }