You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2013/09/14 05:11:53 UTC

[jira] [Commented] (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:comment-tabpanel&focusedCommentId=13767339#comment-13767339 ] 

ASF subversion and git services commented on CB-4761:
-----------------------------------------------------

Commit fbb4342a2c7dfa5c04f68ea2dabc97726e6a9532 in branch refs/heads/master from [~agrieve]
[ https://git-wip-us.apache.org/repos/asf?p=cordova-js.git;h=fbb4342 ]

[CB-4761] Add cordova.platformId property

                
> 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
>
> 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