cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <>
Subject [jira] [Commented] (CB-4761) Add cordova platform id as a property on the cordova object
Date Tue, 22 Oct 2013 15:46:01 GMT


ASF subversion and git services commented on CB-4761:

Commit 6d4c79d4ff8e132e708b70542a7bb5bb91ecbb40 in branch refs/heads/2.9.x from [~agrieve]
[;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:
>             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
> 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

View raw message