cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian LeRoux...@brian.io>
Subject Re: Adding cordova.platform property
Date Fri, 06 Sep 2013 20:22:37 GMT
what does that string return? ios|android|etc? or... ios-7|android-2.3 ???

or browser?


On Fri, Sep 6, 2013 at 1:12 PM, Andrew Grieve <agrieve@chromium.org> wrote:

> +1 Maybe "cordova.platformId" though
>
>
> On Fri, Sep 6, 2013 at 3:46 PM, Ian Clelland <iclelland@chromium.org>
> wrote:
>
> > I brought this up on another thread, but I can't find any reference to
> the
> > issue in JIRA, so I'm starting a new thread for visibility.
> >
> > Since cordova-plugin-device was removed from core, and is now an optional
> > plugin, there is no easy way to determine at runtime what platform an app
> > is running on. (And yes, feature detection is usually better than
> > user-agent detection, but there are legitimate reasons for switching on
> the
> > *cordova* platform as opposed to any particular feature available in the
> > webview)
> >
> > I'd like to make this property available as `cordova.platform; it would
> be
> > a simple string taken from the 'id' defined in
> > cordova-js/lib/<platform>/platform.js.
> >
> > Are there any objections to attaching this to the cordova namespace?
> >
> > Ian
> >
>

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