You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2013/03/06 02:44:58 UTC
mac commit: Fix index.html cordova exec example.
Updated Branches:
refs/heads/master 15c646370 -> 2a4e0f096
Fix index.html cordova exec example.
Project: http://git-wip-us.apache.org/repos/asf/cordova-osx/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-osx/commit/2a4e0f09
Tree: http://git-wip-us.apache.org/repos/asf/cordova-osx/tree/2a4e0f09
Diff: http://git-wip-us.apache.org/repos/asf/cordova-osx/diff/2a4e0f09
Branch: refs/heads/master
Commit: 2a4e0f096a87f880b8424222605023ecb0bc23ff
Parents: 15c6463
Author: Shazron Abdullah <sh...@apache.org>
Authored: Tue Mar 5 17:44:53 2013 -0800
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Tue Mar 5 17:44:53 2013 -0800
----------------------------------------------------------------------
CordovaMac/www/index.html | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-osx/blob/2a4e0f09/CordovaMac/www/index.html
----------------------------------------------------------------------
diff --git a/CordovaMac/www/index.html b/CordovaMac/www/index.html
index c5f8f02..1b16729 100644
--- a/CordovaMac/www/index.html
+++ b/CordovaMac/www/index.html
@@ -38,9 +38,12 @@ Licensed to the Apache Software Foundation (ASF) under one
function onDeviceReady()
{
- console.log("Cordova is working!");
- navigator.notification.alert("Cordova is working!", "Apache Cordova");
- cordovabridge.exec('INVALID', 'TestService', 'TestAction', [ 1, 'two', { 3 : 'three', 'four': 4 }]);
+ try {
+ var exec = cordova.require('cordova/exec');
+ exec(null, null, 'TestService', 'TestAction', [ 1, 'two', { 3 : 'three', 'four': 4 }]);
+ } catch (e) {
+ alert(e);
+ }
}
</script>