Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

Canonical way to detect if we're inside Capacitor

$
0
0

@silviogutierrez wrote:

I’m migrating over from Cordova. Very excited to try out Capacitor.

I share my web code with my hybrid native apps, and all over the place I do this:

!!window.cordova to know if I’m running on a web browser vs an app store app.

I think this may continue to work in Capacitor, as there’s an object there, but it doesn’t sound right.

What’s the canonical way to detect that I’m in a capacitor context? I searched through the docs but couldn’t find anything.

Thanks for any help. This is a great library.

Best,

Silvio

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>