Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

updating js and VERSION file

  • Loading branch information...
commit 705c038b8fa2a768db2375af95cfca8c897e94be 1 parent 54fd3ea
Anis Kadri authored December 10, 2012

Showing 2 changed files with 49 additions and 12 deletions. Show diff stats Hide diff stats

  1. 59  Res/js/cordova.js
  2. 2  VERSION
59  Res/js/cordova.js
... ...
@@ -1,6 +1,6 @@
1  
-// commit 05bd1a469fd7964a7eb8363e55a949594afe9353
  1
+// commit 861ff3d507fd5c64ed789d8abe360690e588252e
2 2
 
3  
-// File generated at :: Mon Nov 26 2012 11:26:58 GMT-0800 (PST)
  3
+// File generated at :: Mon Dec 10 2012 14:51:17 GMT-0800 (PST)
4 4
 
5 5
 /*
6 6
  Licensed to the Apache Software Foundation (ASF) under one
@@ -3063,18 +3063,55 @@ define("cordova/plugin/InAppBrowser", function(require, exports, module) {
3063 3063
 
3064 3064
 var exec = require('cordova/exec');
3065 3065
 
3066  
-var InAppBrowser = {
3067  
-    open : function(strUrl, strWindowName, strWindowFeatures) {
3068  
-        exec(null, null, "InAppBrowser", "open", [strUrl, strWindowName, strWindowFeatures]);
3069  
-        return InAppBrowser;
3070  
-    },
3071  
-    close : function() {
3072  
-        exec(null, null, "InAppBrowser", "close", []);
  3066
+function InAppBrowser()
  3067
+{
  3068
+   var _channel = require('cordova/channel');
  3069
+   this.channels = {
  3070
+        'loadstart': _channel.create('loadstart'),
  3071
+        'loadstop' : _channel.create('loadstop'),
  3072
+        'exit' : _channel.create('exit')
  3073
+   };
  3074
+}
  3075
+
  3076
+InAppBrowser.prototype._eventHandler = function(event)
  3077
+{
  3078
+    if (event.type in this.channels) {
  3079
+        this.channels[event.type].fire(event);
3073 3080
     }
3074  
-};
  3081
+}
  3082
+
  3083
+InAppBrowser.open = function(strUrl, strWindowName, strWindowFeatures)
  3084
+{
  3085
+    var iab = new InAppBrowser();
  3086
+    var cb = function(eventname) {
  3087
+       iab._eventHandler(eventname);
  3088
+    }
  3089
+    exec(cb, null, "InAppBrowser", "open", [strUrl, strWindowName, strWindowFeatures]);
  3090
+    return iab;
  3091
+}
  3092
+
  3093
+InAppBrowser.prototype.close = function(eventname, f)
  3094
+{
  3095
+    exec(null, null, "InAppBrowser", "close", []);
  3096
+}
  3097
+
  3098
+InAppBrowser.prototype.addEventListener = function(eventname, f)
  3099
+{
  3100
+    if (eventname in this.channels) {
  3101
+        this.channels[eventname].subscribe(f);
  3102
+    }
  3103
+}
  3104
+
  3105
+InAppBrowser.prototype.removeEventListener = function(eventname, f)
  3106
+{
  3107
+    if (eventname in this.channels) {
  3108
+        this.channels[eventname].unsubscribe(f);
  3109
+    }
  3110
+}
3075 3111
 
3076 3112
 module.exports = InAppBrowser.open;
3077 3113
 
  3114
+
3078 3115
 });
3079 3116
 
3080 3117
 // file: lib/common/plugin/LocalFileSystem.js
@@ -4286,7 +4323,7 @@ Device.prototype.getDeviceInfo = function(success, fail, args) {
4286 4323
            me.platform = os_vendor + " " + os_name;
4287 4324
            me.version = os_version;
4288 4325
            me.uuid = uuid;
4289  
-           me.cordova = "2.3.0rc1";
  4326
+           me.cordova = "2.3.0rc2";
4290 4327
            success(me);
4291 4328
        }
4292 4329
    };
2  VERSION
... ...
@@ -1 +1 @@
1  
-2.3.0rc1
  1
+2.3.0rc2

0 notes on commit 705c038

Please sign in to comment.
Something went wrong with that request. Please try again.