question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

feat: Enable opening system browser app in Browser plugin

See original GitHub issue

Feature Request

Describe the Feature Request

Browser capacitor plugin now always opens a “pop-up” in-app browser. It would be useful to be able to open system browser app (Chrome, Safari…) instead. Cordova version of this plugin enables that by passing “_system” as window name, the capacitor version does not. Capacitor plugin does have a windowName option, but it does not work in a similar matter.

Currently it is possible to achieve the requested behaviour by using cordova InAppBrowser plugin. However, it would be nice if we could stick to the capacitor plugin.

Thanks.

Platform Support Requested

  • Android
  • iOS
  • Electron
  • Web

Describe Preferred Solution

This code

Browser.open({
  url: "https://www.google.com",
  windowName: "_system"
})

could open browser app in similar matter as cordova plugin does.

Describe Alternatives

More intuitive solution could be to add a new prop to BrowserOpenOptions interface.

Browser.open({
  url: "https://www.google.com",
  systemBrowser: true
})

Or add a new method:

Browser.openSystemBrowser({
  url: "https://www.google.com"
})

Related Code

Additional Context

Cordova plugin API: https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-inappbrowser/#cordovainappbrowseropen

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
alexcrooxcommented, Apr 20, 2020

For anyone coming to this thread looking for answers, it seems the native app is still under the same security limitations as the browser in that if you take too long to window.open() after a user action (i.e a slow API call) then it will silently fail.

To make sure you can always open native Safari use window.location = url

1reaction
tonymartin-devcommented, Aug 18, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

In-App Browsers: What You Need to Know
Basic features such as bookmarking, tabs, shared sessions and cookies, reader mode, and private browsing are “free” when using the default ...
Read more >
Chrome app and extension permissions
Admin console permission API What it does Experimental APIs experimental Allows app or extension to use experime... Fullscreen apps app.window.fullscreen Allows app to open in...
Read more >
Okta Browser Plugin
Okta Browser Plugin. The Okta Browser Plugin enables automatic single sign-on (SSO) for app integrations that require end user credentials.
Read more >
The File System Access API: simplifying access to local files
The File System Access API enables developers to build powerful web apps that ... When users click the Open button, the browser shows...
Read more >
K15326: Browser plug-in support for BIG-IP APM features ...
Deliver VPN-less TCP connectivity using the Application Tunnel feature with applets. Real-time rewriting of Java code to allow applet-enabled ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found