incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From purplecabb...@apache.org
Subject [33/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/c72e3667
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/c72e3667
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/c72e3667

Branch: refs/heads/master
Commit: c72e36677cda663756e3318111b73a3916a0eaa6
Parents: a60c256
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 01:08:21 2012 -0700

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


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/c72e3667/lib/exec/wp7.js
----------------------------------------------------------------------
diff --git a/lib/exec/wp7.js b/lib/exec/wp7.js
index de070bc..9ea4831 100644
--- a/lib/exec/wp7.js
+++ b/lib/exec/wp7.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