You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bc...@apache.org on 2012/04/03 20:54:51 UTC

git commit: Provide access to original event handlers.

Updated Branches:
  refs/heads/master c31219a88 -> 9c962f3b0


Provide access to original event handlers.


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

Branch: refs/heads/master
Commit: 9c962f3b02c86a0e58464cb8cb3254fcefc55e63
Parents: c31219a
Author: Bryce Curtis <cu...@gmail.com>
Authored: Tue Apr 3 13:54:34 2012 -0500
Committer: Bryce Curtis <cu...@gmail.com>
Committed: Tue Apr 3 13:54:34 2012 -0500

----------------------------------------------------------------------
 lib/cordova.js |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-js/blob/9c962f3b/lib/cordova.js
----------------------------------------------------------------------
diff --git a/lib/cordova.js b/lib/cordova.js
index ac55943..ab195d8 100644
--- a/lib/cordova.js
+++ b/lib/cordova.js
@@ -94,6 +94,15 @@ var cordova = {
       delete documentEventHandlers[event];
     },
     /**
+     * Retreive original event handlers that were replaced by Cordova
+     *
+     * @return object
+     */
+    getOriginalHandlers: function() {
+        return {'document': {'addEventListener': m_document_addEventListener, 'removeEventListener': m_document_removeEventListener},
+        'window': {'addEventListener': m_window_addEventListener, 'removeEventListener': m_window_removeEventListener}};
+    },
+    /**
      * Method to fire event from native code
      */
     fireDocumentEvent: function(type, data) {