Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

To open url on default browser with incognito mode on cross platforms #266

Closed
hectorvp opened this issue Oct 29, 2021 · 1 comment · Fixed by #294
Closed

To open url on default browser with incognito mode on cross platforms #266

hectorvp opened this issue Oct 29, 2021 · 1 comment · Fixed by #294

Comments

@hectorvp
Copy link

hectorvp commented Oct 29, 2021

How do I open default browser in incognito mode for cross platforms.
If I provide app explicitly, I won't be able to ensure whether that app (browser) is available or not.

await open("https://www.google.com", { app: { name: open.apps.chrome , arguments: ["--incognito"] } });

In above example, it may be possible that chrome isn't installed and hence not default on linux machine.

Is something like this available anywhere??

await open("https://www.google.com", {target: 'browser', 'flags':{incognito: true}});
@hectorvp hectorvp changed the title To open url on default browser in incognito mode on cross platforms To open url on default browser with incognito mode on cross platforms Oct 29, 2021
spneshaei added a commit to spneshaei/open that referenced this issue Jan 29, 2022
@sindresorhus
Copy link
Owner

I suggest we add two more built-in constants:

  • open.apps.browser
  • open.apps.browserPrivate (this one would pass the correct flag)

PR welcome. But it's expected that you know what you're doing, and that you add tests, docs, and types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants