incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fil...@apache.org
Subject git commit: network online/offline events should fire on document, not window. Thanks for finding this Drew
Date Wed, 07 Mar 2012 17:53:07 GMT
Updated Branches:
  refs/heads/master 627eac381 -> 26853d4d1


network online/offline events should fire on document, not window. Thanks for finding this
Drew


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/26853d4d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/tree/26853d4d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/diff/26853d4d

Branch: refs/heads/master
Commit: 26853d4d1893458796b45c085658cd9237dfde88
Parents: 627eac3
Author: Fil Maj <maj.fil@gmail.com>
Authored: Wed Mar 7 09:53:09 2012 -0800
Committer: Fil Maj <maj.fil@gmail.com>
Committed: Wed Mar 7 09:53:09 2012 -0800

----------------------------------------------------------------------
 lib/plugin/network.js |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/26853d4d/lib/plugin/network.js
----------------------------------------------------------------------
diff --git a/lib/plugin/network.js b/lib/plugin/network.js
index 027aa55..29e1aee 100644
--- a/lib/plugin/network.js
+++ b/lib/plugin/network.js
@@ -16,7 +16,7 @@ var NetworkConnection = function () {
                 if (info === "none") {
                     // set a timer if still offline at the end of timer send the offline
event
                     me._timer = setTimeout(function(){
-                        cordova.fireWindowEvent("offline");
+                        cordova.fireDocumentEvent("offline");
                         me._timer = null;
                         }, me.timeout);
                 } else {
@@ -25,7 +25,7 @@ var NetworkConnection = function () {
                         clearTimeout(me._timer);
                         me._timer = null;
                     }
-                    cordova.fireWindowEvent("online");
+                    cordova.fireDocumentEvent("online");
                 }
 
                 // should only fire this once


Mime
View raw message