You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var win1pfad = path.join(__dirname, "win1.html");
var windowManager = remote.require('electron-window-manager');
function create_win1() {
// Create a new window
var win2 = windowManager.createNew('win1', 'Windows 1');
win2.loadURL(win1pfad);
win2.onReady();
win2.open();
}
document.getElementById("btnwin1").onclick = create_win1;
</script>`
Uncaught Error: Could not call remote function 'createNew'. Check that the function signature is correct. Underlying error: Cannot read property 'focus' of null
Error: Could not call remote function 'createNew'. Check that the function signature is correct. Underlying error: Cannot read property 'focus' of null at callFunction ....
The text was updated successfully, but these errors were encountered:
@hevilp Just to be clear: did you also had to specify all the arguments to make this work? var win2 = windowManager.createNew('win1', 'Windows 1', null, false, {}, false);
Like so?
Also: you should use .setURL() instead of .loadURL() before using .open().
`<script>
const path = require('path');
const fs = require('fs');
const app = require('electron').remote.app;
const cp = require('child_process');
const remote = require('electron').remote;
var win1pfad = path.join(__dirname, "win1.html");
var windowManager = remote.require('electron-window-manager');
function create_win1() {
// Create a new window
var win2 = windowManager.createNew('win1', 'Windows 1');
win2.loadURL(win1pfad);
win2.onReady();
win2.open();
}
document.getElementById("btnwin1").onclick = create_win1;
</script>`
Uncaught Error: Could not call remote function 'createNew'. Check that the function signature is correct. Underlying error: Cannot read property 'focus' of null
Error: Could not call remote function 'createNew'. Check that the function signature is correct. Underlying error: Cannot read property 'focus' of null at callFunction ....
The text was updated successfully, but these errors were encountered: