[ 
https://issues.apache.org/jira/browse/CB-4761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13801943#comment-13801943
 ] 

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

Commit 6d4c79d4ff8e132e708b70542a7bb5bb91ecbb40 in branch refs/heads/2.9.x from 
[~agrieve]
[ https://git-wip-us.apache.org/repos/asf?p=cordova-js.git;h=6d4c79d ]

[CB-4761] Add cordova.platformId property
(cherry picked from commit fbb4342a2c7dfa5c04f68ea2dabc97726e6a9532)


> 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 was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to