You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Andrew Grieve (JIRA)" <ji...@apache.org> on 2013/09/14 05:13:51 UTC

[jira] [Resolved] (CB-4761) Add cordova platform id as a property on the cordova object

     [ https://issues.apache.org/jira/browse/CB-4761?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Grieve resolved CB-4761.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 3.1.0
    
> Add cordova platform id as a property on the cordova object
> -----------------------------------------------------------
>
>                 Key: CB-4761
>                 URL: https://issues.apache.org/jira/browse/CB-4761
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: CordovaJS
>            Reporter: Ian Clelland
>            Assignee: Andrew Grieve
>             Fix For: 3.1.0
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira