cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Mueller <>
Subject Re: Determining if "you're in cordova"
Date Fri, 30 Nov 2012 23:49:29 GMT
On Fri, Nov 30, 2012 at 6:27 PM, Filip Maj <> wrote:

> The question becomes: since both browser and native versions of the app
> include cordova.js, how do we know if we're in cordova or not?

Great question.

> What about during cordova.js' initialization we test the bridge (echo
> plugin?). If it works, we set window.cordova.isWebView or some shit. If it
> doesn't, well, it deosnt.

When are you allowed to check for whether window.cordova.isWebView is set?
 Obviously by the time "deviceready" fires, but ... is there some other
event or timeframe?

Patrick Mueller

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message