Changed JavaScript invoked from PluginResult native code to use new modular JS approach

This commit is contained in:
Fil Maj 2012-01-25 15:31:09 -08:00 committed by Joe Bowser
parent 8a137395ae
commit 45d75524c9

View File

@ -84,11 +84,11 @@ public class PluginResult {
} }
public String toSuccessCallbackString(String callbackId) { public String toSuccessCallbackString(String callbackId) {
return "Cordova.callbackSuccess('"+callbackId+"',"+this.getJSONString()+");"; return "require('cordova').callbackSuccess('"+callbackId+"',"+this.getJSONString()+");";
} }
public String toErrorCallbackString(String callbackId) { public String toErrorCallbackString(String callbackId) {
return "Cordova.callbackError('"+callbackId+"', " + this.getJSONString()+ ");"; return "require('cordova').callbackError('"+callbackId+"', " + this.getJSONString()+ ");";
} }
public static String[] StatusMessages = new String[] { public static String[] StatusMessages = new String[] {