updating js and VERSION file
diff --git a/Res/js/cordova.js b/Res/js/cordova.js index a5d8ada..e2f2f19 100644 --- a/Res/js/cordova.js +++ b/Res/js/cordova.js
@@ -1,6 +1,6 @@ -// commit 05bd1a469fd7964a7eb8363e55a949594afe9353 +// commit 861ff3d507fd5c64ed789d8abe360690e588252e -// File generated at :: Mon Nov 26 2012 11:26:58 GMT-0800 (PST) +// File generated at :: Mon Dec 10 2012 14:51:17 GMT-0800 (PST) /* Licensed to the Apache Software Foundation (ASF) under one @@ -3063,18 +3063,55 @@ var exec = require('cordova/exec'); -var InAppBrowser = { - open : function(strUrl, strWindowName, strWindowFeatures) { - exec(null, null, "InAppBrowser", "open", [strUrl, strWindowName, strWindowFeatures]); - return InAppBrowser; - }, - close : function() { - exec(null, null, "InAppBrowser", "close", []); +function InAppBrowser() +{ + var _channel = require('cordova/channel'); + this.channels = { + 'loadstart': _channel.create('loadstart'), + 'loadstop' : _channel.create('loadstop'), + 'exit' : _channel.create('exit') + }; +} + +InAppBrowser.prototype._eventHandler = function(event) +{ + if (event.type in this.channels) { + this.channels[event.type].fire(event); } -}; +} + +InAppBrowser.open = function(strUrl, strWindowName, strWindowFeatures) +{ + var iab = new InAppBrowser(); + var cb = function(eventname) { + iab._eventHandler(eventname); + } + exec(cb, null, "InAppBrowser", "open", [strUrl, strWindowName, strWindowFeatures]); + return iab; +} + +InAppBrowser.prototype.close = function(eventname, f) +{ + exec(null, null, "InAppBrowser", "close", []); +} + +InAppBrowser.prototype.addEventListener = function(eventname, f) +{ + if (eventname in this.channels) { + this.channels[eventname].subscribe(f); + } +} + +InAppBrowser.prototype.removeEventListener = function(eventname, f) +{ + if (eventname in this.channels) { + this.channels[eventname].unsubscribe(f); + } +} module.exports = InAppBrowser.open; + }); // file: lib/common/plugin/LocalFileSystem.js @@ -4286,7 +4323,7 @@ me.platform = os_vendor + " " + os_name; me.version = os_version; me.uuid = uuid; - me.cordova = "2.3.0rc1"; + me.cordova = "2.3.0rc2"; success(me); } };
diff --git a/VERSION b/VERSION index d2a7ed1..bcf7441 100644 --- a/VERSION +++ b/VERSION
@@ -1 +1 @@ -2.3.0rc1 +2.3.0rc2