incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject [24/40] git commit: sends output to console if window.external.Notify is not defined, ie in a desktop browser
Date Fri, 06 Apr 2012 01:20:43 GMT
sends output to console if window.external.Notify is not defined, ie in a desktop browser


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/commit/5aacfa03
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/5aacfa03
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/5aacfa03

Branch: refs/heads/master
Commit: 5aacfa03af03e5d978ef7547bb69b78ec73ec63b
Parents: 558a632
Author: Jesse MacFadyen <purplecabbage@gmail.com>
Authored: Wed Mar 28 01:08:21 2012 -0700
Committer: Jesse MacFadyen <purplecabbage@gmail.com>
Committed: Wed Mar 28 16:01:38 2012 -0700

----------------------------------------------------------------------
 lib/wp7/exec.js |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/5aacfa03/lib/wp7/exec.js
----------------------------------------------------------------------
diff --git a/lib/wp7/exec.js b/lib/wp7/exec.js
index de070bc..9ea4831 100644
--- a/lib/wp7/exec.js
+++ b/lib/wp7/exec.js
@@ -24,7 +24,14 @@ module.exports = function(success, fail, service, action, args) {
     // generate a new command string, ex. DebugConsole/log/DebugConsole23/{"message":"wtf
dude?"}
      var command = service + "/" + action + "/" + callbackId + "/" + JSON.stringify(args);
      // pass it on to Notify
-     window.external.Notify(command);
+	 if(window.external && window.external.Notify)
+	 {
+     	window.external.Notify(command);
+	 }
+	 else
+	 {
+		console.log("Notify: " + command);  
+	 }
 };
 
 


Mime
View raw message