stuff
This commit is contained in:
parent
4b54b41c96
commit
e12f47245d
|
@ -3877,7 +3877,7 @@
|
|||
if (typeof browserWindow.removeMenu == "function") browserWindow.removeMenu();
|
||||
else browserWindow.setMenu(null);
|
||||
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);
|
||||
return browserWindow;
|
||||
};
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -5,7 +5,7 @@
|
|||
|
||||
window.respondToParent = function (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;
|
||||
if (ipcRenderer && typeof ipcRenderer.sendTo == "function") ipcRenderer.sendTo(data.hostId, data.hostName, data);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue