You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by fi...@apache.org on 2012/03/07 18:53:07 UTC
git commit: network online/offline events should fire on document,
not window. Thanks for finding this Drew
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 <ma...@gmail.com>
Authored: Wed Mar 7 09:53:09 2012 -0800
Committer: Fil Maj <ma...@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