[
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