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

Michael Brooks commented on CB-3050:
------------------------------------

[Commit 
cbfe30|https://git-wip-us.apache.org/repos/asf?p=cordova-cli.git;a=commit;h=cbfe309a13bc2444f90bacc05f6bef17a41ae3d6]

The following interface is now exposed at the module-level:

{code}
cordova.platform.supports(name, callback);
{code}

A full example is as follows:

{code}
cordova.platform.supports('android', function(e) {
  if (e) {
    // platform is unsupported
    // e is type Error
  }
});
{code}
                
> Publicly Expose Platform Check Requirements
> -------------------------------------------
>
>                 Key: CB-3050
>                 URL: https://issues.apache.org/jira/browse/CB-3050
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: CLI
>    Affects Versions: 2.7.0
>            Reporter: Michael Brooks
>            Assignee: Michael Brooks
>             Fix For: 2.7.0
>
>
> When using the {{cordova-cli}} as a node module, it is useful for the client 
> to check platform support.
> Currently, the {{check_requirements(callback)}} function is available under 
> {{/src/metadata/xxx_parser.js}}. This is only available to internal modules 
> and cannot be publicly accessed.

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

Reply via email to