You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by he...@apache.org on 2013/01/03 21:47:38 UTC

webos commit: updated 2.3.0 updates to cordova-js libs

Updated Branches:
  refs/heads/master 50928b795 -> 65fa7c699


updated 2.3.0 updates to cordova-js libs


Project: http://git-wip-us.apache.org/repos/asf/cordova-webos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-webos/commit/65fa7c69
Tree: http://git-wip-us.apache.org/repos/asf/cordova-webos/tree/65fa7c69
Diff: http://git-wip-us.apache.org/repos/asf/cordova-webos/diff/65fa7c69

Branch: refs/heads/master
Commit: 65fa7c69974c9849178878329927d98382308175
Parents: 50928b7
Author: hermwong <he...@gmail.com>
Authored: Thu Jan 3 11:45:50 2013 -0800
Committer: hermwong <he...@gmail.com>
Committed: Thu Jan 3 11:45:50 2013 -0800

----------------------------------------------------------------------
 lib/cordova.webos-debug.js |   10 +++---
 lib/cordova.webos.js       |   65 ++++++++++++++++++++++++++++++--------
 2 files changed, 56 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-webos/blob/65fa7c69/lib/cordova.webos-debug.js
----------------------------------------------------------------------
diff --git a/lib/cordova.webos-debug.js b/lib/cordova.webos-debug.js
index 8946918..71ef689 100644
--- a/lib/cordova.webos-debug.js
+++ b/lib/cordova.webos-debug.js
@@ -1,6 +1,6 @@
-// commit 0a4e6fd7f89ad229ed98a4222e83634d5cf7968d
+// commit 24d65ab645742e8360c3dd16d7a36411cc3383e0
 
-// File generated at :: Wed Nov 28 2012 16:21:57 GMT-0800 (PST)
+// File generated at :: Thu Jan 03 2013 11:30:14 GMT-0800 (PST)
 
 /*
  Licensed to the Apache Software Foundation (ASF) under one
@@ -31,7 +31,7 @@ try {eval("define(\"cordova/channel\", function(require, exports, module) {\n\nv
 try {eval("define(\"cordova/commandProxy\", function(require, exports, module) {\n\n\n// internal map of proxy function\nvar CommandProxyMap = {};\n\nmodule.exports = {\n\n    // example: cordova.commandProxy.add(\"Accelerometer\",{getCurrentAcceleration: function(successCallback, errorCallback, options) {...},...);\n    add:function(id,proxyObj) {\n        console.log(\"adding proxy for \" + id);\n        CommandProxyMap[id] = proxyObj;\n        return proxyObj;\n    },\n\n    // cordova.commandProxy.remove(\"Accelerometer\");\n    remove:function(id) {\n        var proxy = CommandProxyMap[id];\n        delete CommandProxyMap[id];\n        CommandProxyMap[id] = null;\n        return proxy;\n    },\n\n    get:function(service,action) {\n        return ( CommandProxyMap[service] ? CommandProxyMap[service][action] : null );\n    }\n};\n});\n\n//@ sourceURL=lib/common/commandProxy.js")} catch(e) {console.log("exception: in lib/common/commandProxy.js: " + e);console.log(e.stack);}
 try {eval("define(\"cordova/common\", function(require, exports, module) {\n\nmodule.exports = {\n    defaults: {\n        cordova: {\n            path: 'cordova',\n            children: {\n                exec: {\n                    path: 'cordova/exec'\n                },\n                logger: {\n                    path: 'cordova/plugin/logger'\n                }\n            }\n        },\n        Cordova: {\n            children: {\n                exec: {\n                    path: 'cordova/exec'\n                }\n            }\n        },\n        open : {\n            path: 'cordova/plugin/InAppBrowser'\n        },\n        navigator: {\n            children: {\n                notification: {\n                    path: 'cordova/plugin/notification'\n                },\n                accelerometer: {\n                    path: 'cordova/plugin/accelerometer'\n                },\n                battery: {\n                    path: 'cordova/plugin/battery'\n          
       },\n                camera:{\n                    path: 'cordova/plugin/Camera'\n                },\n                compass:{\n                    path: 'cordova/plugin/compass'\n                },\n                contacts: {\n                    path: 'cordova/plugin/contacts'\n                },\n                device:{\n                    children:{\n                        capture: {\n                            path: 'cordova/plugin/capture'\n                        }\n                    }\n                },\n                geolocation: {\n                    path: 'cordova/plugin/geolocation'\n                },\n                globalization: {\n                    path: 'cordova/plugin/globalization'\n                },\n                network: {\n                    children: {\n                        connection: {\n                            path: 'cordova/plugin/network',\n                            deprecated: 'navigator.network.connection is deprecated.
  Use navigator.connection instead.'\n                        }\n                    }\n                },\n                splashscreen: {\n                    path: 'cordova/plugin/splashscreen'\n                }\n            }\n        },\n        Acceleration: {\n            path: 'cordova/plugin/Acceleration'\n        },\n        Camera:{\n            path: 'cordova/plugin/CameraConstants'\n        },\n        CameraPopoverOptions: {\n            path: 'cordova/plugin/CameraPopoverOptions'\n        },\n        CaptureError: {\n            path: 'cordova/plugin/CaptureError'\n        },\n        CaptureAudioOptions:{\n            path: 'cordova/plugin/CaptureAudioOptions'\n        },\n        CaptureImageOptions: {\n            path: 'cordova/plugin/CaptureImageOptions'\n        },\n        CaptureVideoOptions: {\n            path: 'cordova/plugin/CaptureVideoOptions'\n        },\n        CompassHeading:{\n            path: 'cordova/plugin/CompassHeading'\n        },\n        Co
 mpassError:{\n            path: 'cordova/plugin/CompassError'\n        },\n        ConfigurationData: {\n            path: 'cordova/plugin/ConfigurationData'\n        },\n        Connection: {\n            path: 'cordova/plugin/Connection'\n        },\n        Contact: {\n            path: 'cordova/plugin/Contact'\n        },\n        ContactAddress: {\n            path: 'cordova/plugin/ContactAddress'\n        },\n        ContactError: {\n            path: 'cordova/plugin/ContactError'\n        },\n        ContactField: {\n            path: 'cordova/plugin/ContactField'\n        },\n        ContactFindOptions: {\n            path: 'cordova/plugin/ContactFindOptions'\n        },\n        ContactName: {\n            path: 'cordova/plugin/ContactName'\n        },\n        ContactOrganization: {\n            path: 'cordova/plugin/ContactOrganization'\n        },\n        Coordinates: {\n            path: 'cordova/plugin/Coordinates'\n        },\n        device: {\n            path: 'co
 rdova/plugin/device'\n        },\n        DirectoryEntry: {\n            path: 'cordova/plugin/DirectoryEntry'\n        },\n        DirectoryReader: {\n            path: 'cordova/plugin/DirectoryReader'\n        },\n        Entry: {\n            path: 'cordova/plugin/Entry'\n        },\n        File: {\n            path: 'cordova/plugin/File'\n        },\n        FileEntry: {\n            path: 'cordova/plugin/FileEntry'\n        },\n        FileError: {\n            path: 'cordova/plugin/FileError'\n        },\n        FileReader: {\n            path: 'cordova/plugin/FileReader'\n        },\n        FileSystem: {\n            path: 'cordova/plugin/FileSystem'\n        },\n        FileTransfer: {\n            path: 'cordova/plugin/FileTransfer'\n        },\n        FileTransferError: {\n            path: 'cordova/plugin/FileTransferError'\n        },\n        FileUploadOptions: {\n            path: 'cordova/plugin/FileUploadOptions'\n        },\n        FileUploadResult: {\n        
     path: 'cordova/plugin/FileUploadResult'\n        },\n        FileWriter: {\n            path: 'cordova/plugin/FileWriter'\n        },\n        Flags: {\n            path: 'cordova/plugin/Flags'\n        },\n        GlobalizationError: {\n            path: 'cordova/plugin/GlobalizationError'\n        },\n        LocalFileSystem: {\n            path: 'cordova/plugin/LocalFileSystem'\n        },\n        Media: {\n            path: 'cordova/plugin/Media'\n        },\n        MediaError: {\n            path: 'cordova/plugin/MediaError'\n        },\n        MediaFile: {\n            path: 'cordova/plugin/MediaFile'\n        },\n        MediaFileData:{\n            path: 'cordova/plugin/MediaFileData'\n        },\n        Metadata:{\n            path: 'cordova/plugin/Metadata'\n        },\n        Position: {\n            path: 'cordova/plugin/Position'\n        },\n        PositionError: {\n            path: 'cordova/plugin/PositionError'\n        },\n        ProgressEvent: {\n      
       path: 'cordova/plugin/ProgressEvent'\n        },\n        requestFileSystem:{\n            path: 'cordova/plugin/requestFileSystem'\n        },\n        resolveLocalFileSystemURI:{\n            path: 'cordova/plugin/resolveLocalFileSystemURI'\n        }\n    },\n    clobbers: {\n        navigator: {\n            children: {\n                connection: {\n                    path: 'cordova/plugin/network'\n                }\n            }\n        }\n    }\n};\n\n});\n\n//@ sourceURL=lib/common/common.js")} catch(e) {console.log("exception: in lib/common/common.js: " + e);console.log(e.stack);}
 try {eval("define(\"cordova/exec\", function(require, exports, module) {\n\n/**\n * Execute a cordova command.  It is up to the native side whether this action\n * is synchronous or asynchronous.  The native side can return:\n *      Synchronous: PluginResult object as a JSON string\n *      Asynchrounous: Empty string \"\"\n * If async, the native side will cordova.callbackSuccess or cordova.callbackError,\n * depending upon the result of the action.\n *\n * @param {Function} success    The success callback\n * @param {Function} fail       The fail callback\n * @param {String} service      The name of the service to use\n * @param {String} action       Action to be run in cordova\n * @param {String[]} [args]     Zero or more arguments to pass to the method\n */\n\nvar plugins = {\n    \"Device\": require('cordova/plugin/webos/device'),\n    \"NetworkStatus\": require('cordova/plugin/webos/network'),\n    \"Compass\": require('cordova/plugin/webos/compass'),\n    \"Camera\": require
 ('cordova/plugin/webos/camera'),\n    \"Accelerometer\" : require('cordova/plugin/webos/accelerometer'),\n    \"Notification\" : require('cordova/plugin/webos/notification'),\n    \"Geolocation\": require('cordova/plugin/webos/geolocation')\n};\n\nmodule.exports = function(success, fail, service, action, args) {\n    try {\n        console.error(\"exec:call plugin:\"+service+\":\"+action);\n        plugins[service][action](success, fail, args);\n    }\n    catch(e) {\n        console.error(\"missing exec: \" + service + \".\" + action);\n        console.error(args);\n        console.error(e);\n        console.error(e.stack);\n    }\n};\n\n});\n\n//@ sourceURL=lib/webos/exec.js")} catch(e) {console.log("exception: in lib/webos/exec.js: " + e);console.log(e.stack);}
-try {eval("define(\"cordova/platform\", function(require, exports, module) {\n\nvar service=require('cordova/plugin/webos/service'),\n    cordova = require('cordova');\n\nmodule.exports = {\n    id: \"webos\",\n    initialize: function() {\n        if (window.PalmSystem) {\n            window.PalmSystem.stageReady();\n        }\n\n        var Mojo = window.Mojo || {};\n\n        // wait for deviceready before listening and firing document events\n        document.addEventListener(\"deviceready\", function () {\n\n            // LunaSysMgr calls this when the windows is maximized or opened.\n            window.Mojo.stageActivated = function() {\n                console.log(\"stageActivated\");\n                cordova.fireDocumentEvent(\"resume\");\n            };\n            // LunaSysMgr calls this when the windows is minimized or closed.\n            window.Mojo.stageDeactivated = function() {\n                console.log(\"stageDeactivated\");\n                cordova.fireDocume
 ntEvent(\"pause\");\n            };\n            // LunaSysMgr calls this when a KeepAlive app's window is hidden\n            window.Mojo.hide = function() {\n                console.log(\"hide\");\n            };\n            // LunaSysMgr calls this when a KeepAlive app's window is shown\n            window.Mojo.show = function() {\n                console.log(\"show\");\n            };\n\n            // LunaSysMgr calls this whenever an app is \"launched;\" \n            window.Mojo.relaunch = function() {\n                // need to return true to tell sysmgr the relaunch succeeded.\n                // otherwise, it'll try to focus the app, which will focus the first\n                // opened window of an app with multiple windows.\n                console.log(\"relaunch\");\n                return true;\n            };\n\n            // start to listen for network connection changes\n            service.Request('palm://com.palm.connectionmanager', {\n                method: '
 getstatus',\n                parameters: { subscribe: true },\n                onSuccess: function (result) {\n                    console.log(\"subscribe:result:\"+JSON.stringify(result));\n\n                    if (!result.isInternetConnectionAvailable) { \n                        if (navigator.onLine) {\n                            console.log(\"Firing event:offline\");\n                            cordova.fireDocumentEvent(\"offline\");\n                        }\n                    } else {\n                        console.log(\"Firing event:online\");\n                        cordova.fireDocumentEvent(\"online\");\n                    }\n                },\n                onFailure: function(e) {\n                    console.error(\"subscribe:error\");\n                }\n            });\n\n        });\n    },\n    clobbers: {\n        requestFileSystem:{\n            path: 'cordova/plugin/webos/requestfilesystem'\n        },\n        FileReader: {\n            path: \"cordo
 va/plugin/webos/filereader\"\n        }\n    },\n    merges: {\n        navigator: {\n            children: {\n                service: {\n                    path: \"cordova/plugin/webos/service\"\n                },\n                application: {\n                    path: \"cordova/plugin/webos/application\"\n                },\n                window: {\n                    path: \"cordova/plugin/webos/window\"\n                },\n                notification: {\n                    path: \"cordova/plugin/webos/notification\"\n                },\n                orientation: {\n                    path: \"cordova/plugin/webos/orientation\"\n                },\n                keyboard: {\n                    path: \"cordova/plugin/webos/keyboard\"\n                }\n            }\n        }\n    }\n};\n\n});\n\n//@ sourceURL=lib/webos/platform.js")} catch(e) {console.log("exception: in lib/webos/platform.js: " + e);console.log(e.stack);}
+try {eval("define(\"cordova/platform\", function(require, exports, module) {\n\nvar service=require('cordova/plugin/webos/service'),\n    cordova = require('cordova');\n\nmodule.exports = {\n    id: \"webos\",\n    initialize: function() {\n        if (window.PalmSystem) {\n            window.PalmSystem.stageReady();\n        }\n\n        var Mojo = window.Mojo || {};\n\n        // wait for deviceready before listening and firing document events\n        document.addEventListener(\"deviceready\", function () {\n\n            // LunaSysMgr calls this when the windows is maximized or opened.\n            window.Mojo.stageActivated = function() {\n                console.log(\"stageActivated\");\n                cordova.fireDocumentEvent(\"resume\");\n            };\n            // LunaSysMgr calls this when the windows is minimized or closed.\n            window.Mojo.stageDeactivated = function() {\n                console.log(\"stageDeactivated\");\n                cordova.fireDocume
 ntEvent(\"pause\");\n            };\n            // LunaSysMgr calls this when a KeepAlive app's window is hidden\n            window.Mojo.hide = function() {\n                console.log(\"hide\");\n            };\n            // LunaSysMgr calls this when a KeepAlive app's window is shown\n            window.Mojo.show = function() {\n                console.log(\"show\");\n            };\n\n            // LunaSysMgr calls this whenever an app is \"launched;\"\n            window.Mojo.relaunch = function() {\n                // need to return true to tell sysmgr the relaunch succeeded.\n                // otherwise, it'll try to focus the app, which will focus the first\n                // opened window of an app with multiple windows.\n                console.log(\"relaunch\");\n                return true;\n            };\n\n            // start to listen for network connection changes\n            service.Request('palm://com.palm.connectionmanager', {\n                method: 'g
 etstatus',\n                parameters: { subscribe: true },\n                onSuccess: function (result) {\n                    console.log(\"subscribe:result:\"+JSON.stringify(result));\n\n                    if (!result.isInternetConnectionAvailable) {\n                        if (navigator.onLine) {\n                            console.log(\"Firing event:offline\");\n                            cordova.fireDocumentEvent(\"offline\");\n                        }\n                    } else {\n                        console.log(\"Firing event:online\");\n                        cordova.fireDocumentEvent(\"online\");\n                    }\n                },\n                onFailure: function(e) {\n                    console.error(\"subscribe:error\");\n                }\n            });\n\n        });\n    },\n    clobbers: {\n        requestFileSystem:{\n            path: 'cordova/plugin/webos/requestfilesystem'\n        },\n        FileReader: {\n            path: \"cordova
 /plugin/webos/filereader\"\n        }\n    },\n    merges: {\n        navigator: {\n            children: {\n                service: {\n                    path: \"cordova/plugin/webos/service\"\n                },\n                application: {\n                    path: \"cordova/plugin/webos/application\"\n                },\n                window: {\n                    path: \"cordova/plugin/webos/window\"\n                },\n                notification: {\n                    path: \"cordova/plugin/webos/notification\"\n                },\n                orientation: {\n                    path: \"cordova/plugin/webos/orientation\"\n                },\n                keyboard: {\n                    path: \"cordova/plugin/webos/keyboard\"\n                }\n            }\n        }\n    }\n};\n\n});\n\n//@ sourceURL=lib/webos/platform.js")} catch(e) {console.log("exception: in lib/webos/platform.js: " + e);console.log(e.stack);}
 try {eval("define(\"cordova/plugin/Acceleration\", function(require, exports, module) {\n\nvar Acceleration = function(x, y, z, timestamp) {\n    this.x = x;\n    this.y = y;\n    this.z = z;\n    this.timestamp = timestamp || (new Date()).getTime();\n};\n\nmodule.exports = Acceleration;\n\n});\n\n//@ sourceURL=lib/common/plugin/Acceleration.js")} catch(e) {console.log("exception: in lib/common/plugin/Acceleration.js: " + e);console.log(e.stack);}
 try {eval("define(\"cordova/plugin/Camera\", function(require, exports, module) {\n\nvar exec = require('cordova/exec'),\n    Camera = require('cordova/plugin/CameraConstants');\n\nvar cameraExport = {};\n\n// Tack on the Camera Constants to the base camera plugin.\nfor (var key in Camera) {\n    cameraExport[key] = Camera[key];\n}\n\n/**\n * Gets a picture from source defined by \"options.sourceType\", and returns the\n * image as defined by the \"options.destinationType\" option.\n\n * The defaults are sourceType=CAMERA and destinationType=FILE_URI.\n *\n * @param {Function} successCallback\n * @param {Function} errorCallback\n * @param {Object} options\n */\ncameraExport.getPicture = function(successCallback, errorCallback, options) {\n    options = options || {};\n    // successCallback required\n    if (typeof successCallback != \"function\") {\n        console.log(\"Camera Error: successCallback is not a function\");\n        return;\n    }\n\n    // errorCallback optional\n  
   if (errorCallback && (typeof errorCallback != \"function\")) {\n        console.log(\"Camera Error: errorCallback is not a function\");\n        return;\n    }\n\n    var quality = 50;\n    if (typeof options.quality == \"number\") {\n        quality = options.quality;\n    } else if (typeof options.quality == \"string\") {\n        var qlity = parseInt(options.quality, 10);\n        if (isNaN(qlity) === false) {\n            quality = qlity.valueOf();\n        }\n    }\n\n    var destinationType = Camera.DestinationType.FILE_URI;\n    if (typeof options.destinationType == \"number\") {\n        destinationType = options.destinationType;\n    }\n\n    var sourceType = Camera.PictureSourceType.CAMERA;\n    if (typeof options.sourceType == \"number\") {\n        sourceType = options.sourceType;\n    }\n\n    var targetWidth = -1;\n    if (typeof options.targetWidth == \"number\") {\n        targetWidth = options.targetWidth;\n    } else if (typeof options.targetWidth == \"string\") 
 {\n        var width = parseInt(options.targetWidth, 10);\n        if (isNaN(width) === false) {\n            targetWidth = width.valueOf();\n        }\n    }\n\n    var targetHeight = -1;\n    if (typeof options.targetHeight == \"number\") {\n        targetHeight = options.targetHeight;\n    } else if (typeof options.targetHeight == \"string\") {\n        var height = parseInt(options.targetHeight, 10);\n        if (isNaN(height) === false) {\n            targetHeight = height.valueOf();\n        }\n    }\n\n    var encodingType = Camera.EncodingType.JPEG;\n    if (typeof options.encodingType == \"number\") {\n        encodingType = options.encodingType;\n    }\n\n    var mediaType = Camera.MediaType.PICTURE;\n    if (typeof options.mediaType == \"number\") {\n        mediaType = options.mediaType;\n    }\n    var allowEdit = false;\n    if (typeof options.allowEdit == \"boolean\") {\n        allowEdit = options.allowEdit;\n    } else if (typeof options.allowEdit == \"number\") {\n
         allowEdit = options.allowEdit <= 0 ? false : true;\n    }\n    var correctOrientation = false;\n    if (typeof options.correctOrientation == \"boolean\") {\n        correctOrientation = options.correctOrientation;\n    } else if (typeof options.correctOrientation == \"number\") {\n        correctOrientation = options.correctOrientation <=0 ? false : true;\n    }\n    var saveToPhotoAlbum = false;\n    if (typeof options.saveToPhotoAlbum == \"boolean\") {\n        saveToPhotoAlbum = options.saveToPhotoAlbum;\n    } else if (typeof options.saveToPhotoAlbum == \"number\") {\n        saveToPhotoAlbum = options.saveToPhotoAlbum <=0 ? false : true;\n    }\n    var popoverOptions = null;\n    if (typeof options.popoverOptions == \"object\") {\n        popoverOptions = options.popoverOptions;\n    }\n\n    var args = [quality, destinationType, sourceType, targetWidth, targetHeight, encodingType,\n                mediaType, allowEdit, correctOrientation, saveToPhotoAlbum, popoverOpti
 ons];\n\n    exec(successCallback, errorCallback, \"Camera\", \"takePicture\", args);\n};\n\ncameraExport.cleanup = function(successCallback, errorCallback) {\n    exec(successCallback, errorCallback, \"Camera\", \"cleanup\", []);\n};\n\nmodule.exports = cameraExport;\n\n});\n\n//@ sourceURL=lib/common/plugin/Camera.js")} catch(e) {console.log("exception: in lib/common/plugin/Camera.js: " + e);console.log(e.stack);}
 try {eval("define(\"cordova/plugin/CameraConstants\", function(require, exports, module) {\n\nmodule.exports = {\n  DestinationType:{\n    DATA_URL: 0,         // Return base64 encoded string\n    FILE_URI: 1          // Return file uri (content://media/external/images/media/2 for Android)\n  },\n  EncodingType:{\n    JPEG: 0,             // Return JPEG encoded image\n    PNG: 1               // Return PNG encoded image\n  },\n  MediaType:{\n    PICTURE: 0,          // allow selection of still pictures only. DEFAULT. Will return format specified via DestinationType\n    VIDEO: 1,            // allow selection of video only, ONLY RETURNS URL\n    ALLMEDIA : 2         // allow selection from all media types\n  },\n  PictureSourceType:{\n    PHOTOLIBRARY : 0,    // Choose image from picture library (same as SAVEDPHOTOALBUM for Android)\n    CAMERA : 1,          // Take picture from camera\n    SAVEDPHOTOALBUM : 2  // Choose image from picture library (same as PHOTOLIBRARY for Android)\
 n  },\n  PopoverArrowDirection:{\n      ARROW_UP : 1,        // matches iOS UIPopoverArrowDirection constants to specify arrow location on popover\n      ARROW_DOWN : 2,\n      ARROW_LEFT : 4,\n      ARROW_RIGHT : 8,\n      ARROW_ANY : 15\n  }\n};\n\n});\n\n//@ sourceURL=lib/common/plugin/CameraConstants.js")} catch(e) {console.log("exception: in lib/common/plugin/CameraConstants.js: " + e);console.log(e.stack);}
@@ -67,7 +67,7 @@ try {eval("define(\"cordova/plugin/FileUploadResult\", function(require, exports
 try {eval("define(\"cordova/plugin/FileWriter\", function(require, exports, module) {\n\nvar exec = require('cordova/exec'),\n    FileError = require('cordova/plugin/FileError'),\n    ProgressEvent = require('cordova/plugin/ProgressEvent');\n\n/**\n * This class writes to the mobile device file system.\n *\n * For Android:\n *      The root directory is the root of the file system.\n *      To write to the SD card, the file name is \"sdcard/my_file.txt\"\n *\n * @constructor\n * @param file {File} File object containing file properties\n * @param append if true write to the end of the file, otherwise overwrite the file\n */\nvar FileWriter = function(file) {\n    this.fileName = \"\";\n    this.length = 0;\n    if (file) {\n        this.fileName = file.fullPath || file;\n        this.length = file.size || 0;\n    }\n    // default is to write at the beginning of the file\n    this.position = 0;\n\n    this.readyState = 0; // EMPTY\n\n    this.result = null;\n\n    // Error\n    this
 .error = null;\n\n    // Event handlers\n    this.onwritestart = null;   // When writing starts\n    this.onprogress = null;     // While writing the file, and reporting partial file data\n    this.onwrite = null;        // When the write has successfully completed.\n    this.onwriteend = null;     // When the request has completed (either in success or failure).\n    this.onabort = null;        // When the write has been aborted. For instance, by invoking the abort() method.\n    this.onerror = null;        // When the write has failed (see errors).\n};\n\n// States\nFileWriter.INIT = 0;\nFileWriter.WRITING = 1;\nFileWriter.DONE = 2;\n\n/**\n * Abort writing file.\n */\nFileWriter.prototype.abort = function() {\n    // check for invalid state\n    if (this.readyState === FileWriter.DONE || this.readyState === FileWriter.INIT) {\n        throw new FileError(FileError.INVALID_STATE_ERR);\n    }\n\n    // set error\n    this.error = new FileError(FileError.ABORT_ERR);\n\n    this.read
 yState = FileWriter.DONE;\n\n    // If abort callback\n    if (typeof this.onabort === \"function\") {\n        this.onabort(new ProgressEvent(\"abort\", {\"target\":this}));\n    }\n\n    // If write end callback\n    if (typeof this.onwriteend === \"function\") {\n        this.onwriteend(new ProgressEvent(\"writeend\", {\"target\":this}));\n    }\n};\n\n/**\n * Writes data to the file\n *\n * @param text to be written\n */\nFileWriter.prototype.write = function(text) {\n    // Throw an exception if we are already writing a file\n    if (this.readyState === FileWriter.WRITING) {\n        throw new FileError(FileError.INVALID_STATE_ERR);\n    }\n\n    // WRITING state\n    this.readyState = FileWriter.WRITING;\n\n    var me = this;\n\n    // If onwritestart callback\n    if (typeof me.onwritestart === \"function\") {\n        me.onwritestart(new ProgressEvent(\"writestart\", {\"target\":me}));\n    }\n\n    // Write file\n    exec(\n        // Success callback\n        function(r) {
 \n            // If DONE (cancelled), then don't do anything\n            if (me.readyState === FileWriter.DONE) {\n                return;\n            }\n\n            // position always increases by bytes written because file would be extended\n            me.position += r;\n            // The length of the file is now where we are done writing.\n\n            me.length = me.position;\n\n            // DONE state\n            me.readyState = FileWriter.DONE;\n\n            // If onwrite callback\n            if (typeof me.onwrite === \"function\") {\n                me.onwrite(new ProgressEvent(\"write\", {\"target\":me}));\n            }\n\n            // If onwriteend callback\n            if (typeof me.onwriteend === \"function\") {\n                me.onwriteend(new ProgressEvent(\"writeend\", {\"target\":me}));\n            }\n        },\n        // Error callback\n        function(e) {\n            // If DONE (cancelled), then don't do anything\n            if (me.readyStat
 e === FileWriter.DONE) {\n                return;\n            }\n\n            // DONE state\n            me.readyState = FileWriter.DONE;\n\n            // Save error\n            me.error = new FileError(e);\n\n            // If onerror callback\n            if (typeof me.onerror === \"function\") {\n                me.onerror(new ProgressEvent(\"error\", {\"target\":me}));\n            }\n\n            // If onwriteend callback\n            if (typeof me.onwriteend === \"function\") {\n                me.onwriteend(new ProgressEvent(\"writeend\", {\"target\":me}));\n            }\n        }, \"File\", \"write\", [this.fileName, text, this.position]);\n};\n\n/**\n * Moves the file pointer to the location specified.\n *\n * If the offset is a negative number the position of the file\n * pointer is rewound.  If the offset is greater than the file\n * size the position is set to the end of the file.\n *\n * @param offset is the location to move the file pointer to.\n */\nFileWriter.
 prototype.seek = function(offset) {\n    // Throw an exception if we are already writing a file\n    if (this.readyState === FileWriter.WRITING) {\n        throw new FileError(FileError.INVALID_STATE_ERR);\n    }\n\n    if (!offset && offset !== 0) {\n        return;\n    }\n\n    // See back from end of file.\n    if (offset < 0) {\n        this.position = Math.max(offset + this.length, 0);\n    }\n    // Offset is bigger than file size so set position\n    // to the end of the file.\n    else if (offset > this.length) {\n        this.position = this.length;\n    }\n    // Offset is between 0 and file size so set the position\n    // to start writing.\n    else {\n        this.position = offset;\n    }\n};\n\n/**\n * Truncates the file to the size specified.\n *\n * @param size to chop the file at.\n */\nFileWriter.prototype.truncate = function(size) {\n    // Throw an exception if we are already writing a file\n    if (this.readyState === FileWriter.WRITING) {\n        throw new F
 ileError(FileError.INVALID_STATE_ERR);\n    }\n\n    // WRITING state\n    this.readyState = FileWriter.WRITING;\n\n    var me = this;\n\n    // If onwritestart callback\n    if (typeof me.onwritestart === \"function\") {\n        me.onwritestart(new ProgressEvent(\"writestart\", {\"target\":this}));\n    }\n\n    // Write file\n    exec(\n        // Success callback\n        function(r) {\n            // If DONE (cancelled), then don't do anything\n            if (me.readyState === FileWriter.DONE) {\n                return;\n            }\n\n            // DONE state\n            me.readyState = FileWriter.DONE;\n\n            // Update the length of the file\n            me.length = r;\n            me.position = Math.min(me.position, r);\n\n            // If onwrite callback\n            if (typeof me.onwrite === \"function\") {\n                me.onwrite(new ProgressEvent(\"write\", {\"target\":me}));\n            }\n\n            // If onwriteend callback\n            if (type
 of me.onwriteend === \"function\") {\n                me.onwriteend(new ProgressEvent(\"writeend\", {\"target\":me}));\n            }\n        },\n        // Error callback\n        function(e) {\n            // If DONE (cancelled), then don't do anything\n            if (me.readyState === FileWriter.DONE) {\n                return;\n            }\n\n            // DONE state\n            me.readyState = FileWriter.DONE;\n\n            // Save error\n            me.error = new FileError(e);\n\n            // If onerror callback\n            if (typeof me.onerror === \"function\") {\n                me.onerror(new ProgressEvent(\"error\", {\"target\":me}));\n            }\n\n            // If onwriteend callback\n            if (typeof me.onwriteend === \"function\") {\n                me.onwriteend(new ProgressEvent(\"writeend\", {\"target\":me}));\n            }\n        }, \"File\", \"truncate\", [this.fileName, size]);\n};\n\nmodule.exports = FileWriter;\n\n});\n\n//@ sourceURL=l
 ib/common/plugin/FileWriter.js")} catch(e) {console.log("exception: in lib/common/plugin/FileWriter.js: " + e);console.log(e.stack);}
 try {eval("define(\"cordova/plugin/Flags\", function(require, exports, module) {\n\n/**\n * Supplies arguments to methods that lookup or create files and directories.\n *\n * @param create\n *            {boolean} file or directory if it doesn't exist\n * @param exclusive\n *            {boolean} used with create; if true the command will fail if\n *            target path exists\n */\nfunction Flags(create, exclusive) {\n    this.create = create || false;\n    this.exclusive = exclusive || false;\n}\n\nmodule.exports = Flags;\n\n});\n\n//@ sourceURL=lib/common/plugin/Flags.js")} catch(e) {console.log("exception: in lib/common/plugin/Flags.js: " + e);console.log(e.stack);}
 try {eval("define(\"cordova/plugin/GlobalizationError\", function(require, exports, module) {\n\n\n/**\n * Globalization error object\n *\n * @constructor\n * @param code\n * @param message\n */\nvar GlobalizationError = function(code, message) {\n    this.code = code || null;\n    this.message = message || '';\n};\n\n// Globalization error codes\nGlobalizationError.UNKNOWN_ERROR = 0;\nGlobalizationError.FORMATTING_ERROR = 1;\nGlobalizationError.PARSING_ERROR = 2;\nGlobalizationError.PATTERN_ERROR = 3;\n\nmodule.exports = GlobalizationError;\n\n});\n\n//@ sourceURL=lib/common/plugin/GlobalizationError.js")} catch(e) {console.log("exception: in lib/common/plugin/GlobalizationError.js: " + e);console.log(e.stack);}
-try {eval("define(\"cordova/plugin/InAppBrowser\", function(require, exports, module) {\n\nvar exec = require('cordova/exec');\n\nvar InAppBrowser = {\n    open : function(strUrl, strWindowName, strWindowFeatures) {\n        exec(null, null, \"InAppBrowser\", \"open\", [strUrl, strWindowName, strWindowFeatures]);\n        return InAppBrowser;\n    },\n    close : function() {\n        exec(null, null, \"InAppBrowser\", \"close\", []);\n    }\n};\n\nmodule.exports = InAppBrowser.open;\n\n});\n\n//@ sourceURL=lib/common/plugin/InAppBrowser.js")} catch(e) {console.log("exception: in lib/common/plugin/InAppBrowser.js: " + e);console.log(e.stack);}
+try {eval("define(\"cordova/plugin/InAppBrowser\", function(require, exports, module) {\n\nvar exec = require('cordova/exec');\n\nfunction InAppBrowser()\n{\n   var _channel = require('cordova/channel');\n   this.channels = {\n        'loadstart': _channel.create('loadstart'),\n        'loadstop' : _channel.create('loadstop'),\n        'exit' : _channel.create('exit')\n   };\n}\n\nInAppBrowser.prototype._eventHandler = function(event)\n{\n    if (event.type in this.channels) {\n        this.channels[event.type].fire(event);\n    }\n}\n\nInAppBrowser.open = function(strUrl, strWindowName, strWindowFeatures)\n{\n    var iab = new InAppBrowser();\n    var cb = function(eventname) {\n       iab._eventHandler(eventname);\n    }\n    exec(cb, null, \"InAppBrowser\", \"open\", [strUrl, strWindowName, strWindowFeatures]);\n    return iab;\n}\n\nInAppBrowser.prototype.close = function(eventname, f)\n{\n    exec(null, null, \"InAppBrowser\", \"close\", []);\n}\n\nInAppBrowser.prototype.addEve
 ntListener = function(eventname, f)\n{\n    if (eventname in this.channels) {\n        this.channels[eventname].subscribe(f);\n    }\n}\n\nInAppBrowser.prototype.removeEventListener = function(eventname, f)\n{\n    if (eventname in this.channels) {\n        this.channels[eventname].unsubscribe(f);\n    }\n}\n\nmodule.exports = InAppBrowser.open;\n\n\n});\n\n//@ sourceURL=lib/common/plugin/InAppBrowser.js")} catch(e) {console.log("exception: in lib/common/plugin/InAppBrowser.js: " + e);console.log(e.stack);}
 try {eval("define(\"cordova/plugin/LocalFileSystem\", function(require, exports, module) {\n\nvar exec = require('cordova/exec');\n\n/**\n * Represents a local file system.\n */\nvar LocalFileSystem = function() {\n\n};\n\nLocalFileSystem.TEMPORARY = 0; //temporary, with no guarantee of persistence\nLocalFileSystem.PERSISTENT = 1; //persistent\n\nmodule.exports = LocalFileSystem;\n\n});\n\n//@ sourceURL=lib/common/plugin/LocalFileSystem.js")} catch(e) {console.log("exception: in lib/common/plugin/LocalFileSystem.js: " + e);console.log(e.stack);}
 try {eval("define(\"cordova/plugin/Media\", function(require, exports, module) {\n\nvar utils = require('cordova/utils'),\n    exec = require('cordova/exec');\n\nvar mediaObjects = {};\n\n/**\n * This class provides access to the device media, interfaces to both sound and video\n *\n * @constructor\n * @param src                   The file name or url to play\n * @param successCallback       The callback to be called when the file is done playing or recording.\n *                                  successCallback()\n * @param errorCallback         The callback to be called if there is an error.\n *                                  errorCallback(int errorCode) - OPTIONAL\n * @param statusCallback        The callback to be called when media status has changed.\n *                                  statusCallback(int statusCode) - OPTIONAL\n */\nvar Media = function(src, successCallback, errorCallback, statusCallback) {\n\n    // successCallback optional\n    if (successCallback && (type
 of successCallback !== \"function\")) {\n        console.log(\"Media Error: successCallback is not a function\");\n        return;\n    }\n\n    // errorCallback optional\n    if (errorCallback && (typeof errorCallback !== \"function\")) {\n        console.log(\"Media Error: errorCallback is not a function\");\n        return;\n    }\n\n    // statusCallback optional\n    if (statusCallback && (typeof statusCallback !== \"function\")) {\n        console.log(\"Media Error: statusCallback is not a function\");\n        return;\n    }\n\n    this.id = utils.createUUID();\n    mediaObjects[this.id] = this;\n    this.src = src;\n    this.successCallback = successCallback;\n    this.errorCallback = errorCallback;\n    this.statusCallback = statusCallback;\n    this._duration = -1;\n    this._position = -1;\n    exec(null, this.errorCallback, \"Media\", \"create\", [this.id, this.src]);\n};\n\n// Media messages\nMedia.MEDIA_STATE = 1;\nMedia.MEDIA_DURATION = 2;\nMedia.MEDIA_POSITION = 3;\n
 Media.MEDIA_ERROR = 9;\n\n// Media states\nMedia.MEDIA_NONE = 0;\nMedia.MEDIA_STARTING = 1;\nMedia.MEDIA_RUNNING = 2;\nMedia.MEDIA_PAUSED = 3;\nMedia.MEDIA_STOPPED = 4;\nMedia.MEDIA_MSG = [\"None\", \"Starting\", \"Running\", \"Paused\", \"Stopped\"];\n\n// \"static\" function to return existing objs.\nMedia.get = function(id) {\n    return mediaObjects[id];\n};\n\n/**\n * Start or resume playing audio file.\n */\nMedia.prototype.play = function(options) {\n    exec(null, null, \"Media\", \"startPlayingAudio\", [this.id, this.src, options]);\n};\n\n/**\n * Stop playing audio file.\n */\nMedia.prototype.stop = function() {\n    var me = this;\n    exec(function() {\n        me._position = 0;\n    }, this.errorCallback, \"Media\", \"stopPlayingAudio\", [this.id]);\n};\n\n/**\n * Seek or jump to a new time in the track..\n */\nMedia.prototype.seekTo = function(milliseconds) {\n    var me = this;\n    exec(function(p) {\n        me._position = p;\n    }, this.errorCallback, \"Media\", \
 "seekToAudio\", [this.id, milliseconds]);\n};\n\n/**\n * Pause playing audio file.\n */\nMedia.prototype.pause = function() {\n    exec(null, this.errorCallback, \"Media\", \"pausePlayingAudio\", [this.id]);\n};\n\n/**\n * Get duration of an audio file.\n * The duration is only set for audio that is playing, paused or stopped.\n *\n * @return      duration or -1 if not known.\n */\nMedia.prototype.getDuration = function() {\n    return this._duration;\n};\n\n/**\n * Get position of audio.\n */\nMedia.prototype.getCurrentPosition = function(success, fail) {\n    var me = this;\n    exec(function(p) {\n        me._position = p;\n        success(p);\n    }, fail, \"Media\", \"getCurrentPositionAudio\", [this.id]);\n};\n\n/**\n * Start recording audio file.\n */\nMedia.prototype.startRecord = function() {\n    exec(null, this.errorCallback, \"Media\", \"startRecordingAudio\", [this.id, this.src]);\n};\n\n/**\n * Stop recording audio file.\n */\nMedia.prototype.stopRecord = function() {\
 n    exec(null, this.errorCallback, \"Media\", \"stopRecordingAudio\", [this.id]);\n};\n\n/**\n * Release the resources.\n */\nMedia.prototype.release = function() {\n    exec(null, this.errorCallback, \"Media\", \"release\", [this.id]);\n};\n\n/**\n * Adjust the volume.\n */\nMedia.prototype.setVolume = function(volume) {\n    exec(null, null, \"Media\", \"setVolume\", [this.id, volume]);\n};\n\n/**\n * Audio has status update.\n * PRIVATE\n *\n * @param id            The media object id (string)\n * @param msgType       The 'type' of update this is\n * @param value         Use of value is determined by the msgType\n */\nMedia.onStatus = function(id, msgType, value) {\n\n    var media = mediaObjects[id];\n\n    if(media) {\n        switch(msgType) {\n            case Media.MEDIA_STATE :\n                media.statusCallback && media.statusCallback(value);\n                if(value == Media.MEDIA_STOPPED) {\n                    media.successCallback && media.successCallback();\n    
             }\n                break;\n            case Media.MEDIA_DURATION :\n                media._duration = value;\n                break;\n            case Media.MEDIA_ERROR :\n                media.errorCallback && media.errorCallback(value);\n                break;\n            case Media.MEDIA_POSITION :\n                media._position = Number(value);\n                break;\n            default :\n                console && console.error && console.error(\"Unhandled Media.onStatus :: \" + msgType);\n                break;\n        }\n    }\n    else {\n         console && console.error && console.error(\"Received Media.onStatus callback for unknown media :: \" + id);\n    }\n\n};\n\nmodule.exports = Media;\n\n});\n\n//@ sourceURL=lib/common/plugin/Media.js")} catch(e) {console.log("exception: in lib/common/plugin/Media.js: " + e);console.log(e.stack);}
 try {eval("define(\"cordova/plugin/MediaError\", function(require, exports, module) {\n\n/**\n * This class contains information about any Media errors.\n*/\n/*\n According to :: http://dev.w3.org/html5/spec-author-view/video.html#mediaerror\n We should never be creating these objects, we should just implement the interface\n which has 1 property for an instance, 'code'\n\n instead of doing :\n    errorCallbackFunction( new MediaError(3,'msg') );\nwe should simply use a literal :\n    errorCallbackFunction( {'code':3} );\n */\n\n var _MediaError = window.MediaError;\n\n\nif(!_MediaError) {\n    window.MediaError = _MediaError = function(code, msg) {\n        this.code = (typeof code != 'undefined') ? code : null;\n        this.message = msg || \"\"; // message is NON-standard! do not use!\n    };\n}\n\n_MediaError.MEDIA_ERR_NONE_ACTIVE    = _MediaError.MEDIA_ERR_NONE_ACTIVE    || 0;\n_MediaError.MEDIA_ERR_ABORTED        = _MediaError.MEDIA_ERR_ABORTED        || 1;\n_MediaError.MEDIA
 _ERR_NETWORK        = _MediaError.MEDIA_ERR_NETWORK        || 2;\n_MediaError.MEDIA_ERR_DECODE         = _MediaError.MEDIA_ERR_DECODE         || 3;\n_MediaError.MEDIA_ERR_NONE_SUPPORTED = _MediaError.MEDIA_ERR_NONE_SUPPORTED || 4;\n// TODO: MediaError.MEDIA_ERR_NONE_SUPPORTED is legacy, the W3 spec now defines it as below.\n// as defined by http://dev.w3.org/html5/spec-author-view/video.html#error-codes\n_MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED = _MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED || 4;\n\nmodule.exports = _MediaError;\n\n});\n\n//@ sourceURL=lib/common/plugin/MediaError.js")} catch(e) {console.log("exception: in lib/common/plugin/MediaError.js: " + e);console.log(e.stack);}
@@ -112,7 +112,7 @@ try {eval("define(\"cordova/utils\", function(require, exports, module) {\n\nvar
 
 window.cordova = require('cordova');
 
-try {eval("\n(function (context) {\n    // Replace navigator before any modules are required(), to ensure it happens as soon as possible.\n    // We replace it so that properties that can't be clobbered can instead be overridden.\n    if (context.navigator) {\n        function CordovaNavigator() {}\n        CordovaNavigator.prototype = context.navigator;\n        context.navigator = new CordovaNavigator();\n    }\n\n    var channel = require(\"cordova/channel\"),\n        _self = {\n            boot: function () {\n                /**\n                 * Create all cordova objects once page has fully loaded and native side is ready.\n                 */\n                channel.join(function() {\n                    var builder = require('cordova/builder'),\n                        base = require('cordova/common'),\n                        platform = require('cordova/platform');\n\n                    // Drop the common globals into the window object, but be nice and don't overwrite
  anything.\n                    builder.buildIntoButDoNotClobber(base.defaults, context);\n                    builder.buildIntoAndMerge(base.merges, context);\n                    builder.buildIntoAndClobber(base.clobbers, context);\n\n                    builder.buildIntoButDoNotClobber(platform.defaults, context);\n                    builder.buildIntoAndMerge(platform.merges, context);\n                    builder.buildIntoAndClobber(platform.clobbers, context);\n\n                    // Call the platform-specific initialization\n                    platform.initialize();\n\n                    // Fire event to notify that all objects are created\n                    channel.onCordovaReady.fire();\n\n                    // Fire onDeviceReady event once all constructors have run and\n                    // cordova info has been received from native side.\n                    channel.join(function() {\n                        require('cordova').fireDocumentEvent('deviceready');\n 
                    }, channel.deviceReadyChannelsArray);\n\n                }, [ channel.onDOMContentLoaded, channel.onNativeReady ]);\n            }\n        };\n\n    // boot up once native side is ready\n    channel.onNativeReady.subscribe(_self.boot);\n\n    // _nativeReady is global variable that the native side can set\n    // to signify that the native code is ready. It is a global since\n    // it may be called before any cordova JS is ready.\n    if (window._nativeReady) {\n        channel.onNativeReady.fire();\n    }\n\n}(window));\n\n//@ sourceURL=lib/scripts/bootstrap.js")} catch(e) {console.log("exception: in lib/scripts/bootstrap.js: " + e);console.log(e.stack);}
+try {eval("\n(function (context) {\n    // Replace navigator before any modules are required(), to ensure it happens as soon as possible.\n    // We replace it so that properties that can't be clobbered can instead be overridden.\n    if (context.navigator) {\n        function CordovaNavigator() {}\n        CordovaNavigator.prototype = context.navigator;\n        context.navigator = new CordovaNavigator();\n    }\n\n    var channel = require(\"cordova/channel\"),\n        _self = {\n            boot: function () {\n                /**\n                 * Create all cordova objects once page has fully loaded and native side is ready.\n                 */\n                channel.join(function() {\n                    var builder = require('cordova/builder'),\n                        base = require('cordova/common'),\n                        platform = require('cordova/platform');\n\n                    // Drop the common globals into the window object, but be nice and don't overwrite
  anything.\n                    builder.buildIntoButDoNotClobber(base.defaults, context);\n                    builder.buildIntoAndClobber(base.clobbers, context);\n                    builder.buildIntoAndMerge(base.merges, context);\n\n                    builder.buildIntoButDoNotClobber(platform.defaults, context);\n                    builder.buildIntoAndClobber(platform.clobbers, context);\n                    builder.buildIntoAndMerge(platform.merges, context);\n\n                    // Call the platform-specific initialization\n                    platform.initialize();\n\n                    // Fire event to notify that all objects are created\n                    channel.onCordovaReady.fire();\n\n                    // Fire onDeviceReady event once all constructors have run and\n                    // cordova info has been received from native side.\n                    channel.join(function() {\n                        require('cordova').fireDocumentEvent('deviceready');\n 
                    }, channel.deviceReadyChannelsArray);\n\n                }, [ channel.onDOMContentLoaded, channel.onNativeReady ]);\n            }\n        };\n\n    // boot up once native side is ready\n    channel.onNativeReady.subscribe(_self.boot);\n\n    // _nativeReady is global variable that the native side can set\n    // to signify that the native code is ready. It is a global since\n    // it may be called before any cordova JS is ready.\n    if (window._nativeReady) {\n        channel.onNativeReady.fire();\n    }\n\n}(window));\n\n//@ sourceURL=lib/scripts/bootstrap.js")} catch(e) {console.log("exception: in lib/scripts/bootstrap.js: " + e);console.log(e.stack);}
 try {eval("\nrequire('cordova/channel').onNativeReady.fire();\n\n//@ sourceURL=lib/scripts/bootstrap-webos.js")} catch(e) {console.log("exception: in lib/scripts/bootstrap-webos.js: " + e);console.log(e.stack);}
 
 })();
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-webos/blob/65fa7c69/lib/cordova.webos.js
----------------------------------------------------------------------
diff --git a/lib/cordova.webos.js b/lib/cordova.webos.js
index faefa15..08f9678 100644
--- a/lib/cordova.webos.js
+++ b/lib/cordova.webos.js
@@ -1,6 +1,6 @@
-// commit 0a4e6fd7f89ad229ed98a4222e83634d5cf7968d
+// commit 24d65ab645742e8360c3dd16d7a36411cc3383e0
 
-// File generated at :: Wed Nov 28 2012 16:21:57 GMT-0800 (PST)
+// File generated at :: Thu Jan 03 2013 11:30:14 GMT-0800 (PST)
 
 /*
  Licensed to the Apache Software Foundation (ASF) under one
@@ -1069,7 +1069,7 @@ module.exports = {
                 console.log("show");
             };
 
-            // LunaSysMgr calls this whenever an app is "launched;" 
+            // LunaSysMgr calls this whenever an app is "launched;"
             window.Mojo.relaunch = function() {
                 // need to return true to tell sysmgr the relaunch succeeded.
                 // otherwise, it'll try to focus the app, which will focus the first
@@ -1085,7 +1085,7 @@ module.exports = {
                 onSuccess: function (result) {
                     console.log("subscribe:result:"+JSON.stringify(result));
 
-                    if (!result.isInternetConnectionAvailable) { 
+                    if (!result.isInternetConnectionAvailable) {
                         if (navigator.onLine) {
                             console.log("Firing event:offline");
                             cordova.fireDocumentEvent("offline");
@@ -3144,18 +3144,55 @@ define("cordova/plugin/InAppBrowser", function(require, exports, module) {
 
 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
@@ -6342,12 +6379,12 @@ window.cordova = require('cordova');
 
                     // Drop the common globals into the window object, but be nice and don't overwrite anything.
                     builder.buildIntoButDoNotClobber(base.defaults, context);
-                    builder.buildIntoAndMerge(base.merges, context);
                     builder.buildIntoAndClobber(base.clobbers, context);
+                    builder.buildIntoAndMerge(base.merges, context);
 
                     builder.buildIntoButDoNotClobber(platform.defaults, context);
-                    builder.buildIntoAndMerge(platform.merges, context);
                     builder.buildIntoAndClobber(platform.clobbers, context);
+                    builder.buildIntoAndMerge(platform.merges, context);
 
                     // Call the platform-specific initialization
                     platform.initialize();