[
https://issues.apache.org/jira/browse/CB-6291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13938718#comment-13938718
]
Andrew Grieve commented on CB-6291:
-----------------------------------
I think the API already worked like this.
Have a look at cordova.js and src/util.js
If you pass a function as the last arg, then the code in addModuleProperty
calls it instead of returning a promise.
> [CLI] Implement dual promise/callback api
> -----------------------------------------
>
> Key: CB-6291
> URL: https://issues.apache.org/jira/browse/CB-6291
> Project: Apache Cordova
> Issue Type: Bug
> Components: CLI
> Reporter: Lorin Beer
> Assignee: Lorin Beer
> Priority: Critical
>
> Master issue to manage the subissues involved in this task.
> in each subtask, the goal is to implement an optional promise/callback
> interface. If a callback argument is supplied as the last parameter to a
> function call which supports this api, then the callback is used and the
> function returns null.
> If no callback is supplied, then a promise is returned.
> This upgrade should be non-breaking and backwards compatible.
--
This message was sent by Atlassian JIRA
(v6.2#6252)