Do you want to work on this issue?
You can request for a bounty in order to promote it!
Open in new browser window, not in existing one #264
spiropoulos94 posted onGitHub
Is this possible? Please let me know :)
yes
await open('https://google.com', { app: { name: open.apps.chrome, arguments: ['--new-window'] } })
yes
await open('https://google.com', { app: { name: open.apps.chrome, arguments: ['--new-window'] } })
sorry but this doesnt work. If a have an open chrome window, using this it will just add a new tab. what i want is to open a NEW WINDOW, not add a tab to an existing one.
You need to pass newInstance. For example:
await open('https://google.com', { newInstance: true, app: { name: open.apps.chrome, arguments: ['--new-window'] } })
You need to pass newInstance. For example:
await open('https://google.com', { newInstance: true, app: { name: open.apps.chrome, arguments: ['--new-window'] } })
This does not work, I'm using MacOS. Actually none of the argument passed works. I thought this was fixed. #234
Same here. Trying this on MacOs results in new tab opened in whatever chrome window that is currently open. If all chrome instances are closed then it would open a new chrome window correctly but would continue adding tabs in this mode, regardless of what I specify next.
Has there been any updates on this?
I know this thread is over 2 years old now, but for anyone who may still be struggling with this. I am on macOS and have managed to get the url to open in a new browser window as follows:
open('https://www.google.com', {
newInstance: true,
app: { name: "google chrome", arguments: ["--new-window"] },
});
Just a small change to what somebody posted above, instead of open.apps.chrome
, should be "google chrome".
I have tried @yishairose version and it works. Thanks