Comments (5)
I know this is an old issue, just wanted to leave a note for others that might have the issue. loadURL()
is the wrong method to be using in this situation. Before a window is open()
ed, setURL()
is used to define the window url if it is not done as part of createNew()
. loadURL()
is done after open()
. Example code:
var win2 = windowManager.createNew('win2', 'Windows #2');
win2.setURL('https://www.facebook.com');
win2.open();
win2.loadURL('https://www.google.com');
from electron-window-manager.
Hi there
I am not sure, it's been awhile since I last updated (or used) this library, or Electron for that matter. Try to debug more and If you find a solution please make PR.
Good luck
from electron-window-manager.
Hey I got the same issue,
Started a clean electron-quick-start-master on windows 10, and added the following code to to the index.html:
` var remote = require('electron').remote;
var windowManager = remote.require('electron-window-manager');
// Create a new window
var win2 = windowManager.createNew('win23', 'Windows #2');
win2.loadURL('/test.html');
win2.open();`
This gives the same error as above mentioned. (used different urls, like direct file, http and https)
I tried to find where the index.js of the electron-window-manager crashes, this happens on line 303:
instance.content().loadURL(url, options);
Before this line everything runs, after that line it doesn't.
from electron-window-manager.
Code works when you define the url in the createNew function:
var win2 = windowManager.createNew('win2', 'Windows #2', "http://example.com", false, {}, false); win2.open();
I cant debug further because I cant find something that has to do with content().
Instance just returns the saved window data.
Confirmed that line 303 works fine when loadURL function is not directly called.
from electron-window-manager.
It's also hinted in the README.md, just under setURL :)
... to open a URL after the window is open use loadURL().
-- I just noticed that the readme has an example using loadURL instead of setURL while the description of loadURL is also not very clear :-/
from electron-window-manager.
Related Issues (20)
- importList doesnt seem to work.
- Hiding Windows
- Feature Request: Ability to get the current window's name HOT 1
- clone doesnt work with windows.json properties...
- Layout path not work HOT 2
- bridge.removeListener not works HOT 1
- Unable to load the application interface HOT 5
- annot find module 'remote' HOT 4
- Issue with webview HOT 1
- Detached DevTools Window not working
- typescript types
- Invalid Menu on Linux HOT 2
- create a window and open it hidden HOT 2
- setProxy possible
- NPM version outdated HOT 4
- How to redirect to specific Angular route?
- Unable to load the application interface -> Error with windowManager.createNew() HOT 1
- Attach an existed window to window manager HOT 1
- Z-Index of windows
- How to handle duplicate ipcMain.on methods after multiple Windows of the same instance?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from electron-window-manager.