diff --git a/framework/assets/js/cordova.android.js b/framework/assets/js/cordova.android.js index d02b6f10..a9a6b237 100644 --- a/framework/assets/js/cordova.android.js +++ b/framework/assets/js/cordova.android.js @@ -1,4 +1,4 @@ -// File generated at :: Tue Apr 10 2012 11:22:35 GMT-0700 (PDT) +// File generated at :: Wed Apr 11 2012 10:34:53 GMT-0400 (EDT) /* Licensed to the Apache Software Foundation (ASF) under one @@ -416,7 +416,40 @@ module.exports = { // file: lib/common/channel.js define("cordova/channel", function(require, exports, module) { /** - * Custom pub-sub channel that can have functions subscribed to it + * Custom pub-sub "channel" that can have functions subscribed to it + * This object is used to define and control firing of events for + * cordova initialization. + * + * The order of events during page load and Cordova startup is as follows: + * + * onDOMContentLoaded Internal event that is received when the web page is loaded and parsed. + * onNativeReady Internal event that indicates the Cordova native side is ready. + * onCordovaReady Internal event fired when all Cordova JavaScript objects have been created. + * onCordovaInfoReady Internal event fired when device properties are available. + * onCordovaConnectionReady Internal event fired when the connection property has been set. + * onDeviceReady User event fired to indicate that Cordova is ready + * onResume User event fired to indicate a start/resume lifecycle event + * onPause User event fired to indicate a pause lifecycle event + * onDestroy Internal event fired when app is being destroyed (User should use window.onunload event, not this one). + * + * The only Cordova events that user code should register for are: + * deviceready Cordova native code is initialized and Cordova APIs can be called from JavaScript + * pause App has moved to background + * resume App has returned to foreground + * + * Listeners can be registered as: + * document.addEventListener("deviceready", myDeviceReadyListener, false); + * document.addEventListener("resume", myResumeListener, false); + * document.addEventListener("pause", myPauseListener, false); + * + * The DOM lifecycle events should be used for saving and restoring state + * window.onload + * window.onunload + * + */ + +/** + * Channel * @constructor * @param type String the channel name * @param opts Object options to pass into the channel, currently @@ -586,8 +619,7 @@ Channel.prototype.fire = function(e) { return true; }; -//HACK: defining them here so they are ready super fast! - +// defining them here so they are ready super fast! // DOM event that is received when the web page is loaded and parsed. channel.create('onDOMContentLoaded'); @@ -1044,11 +1076,11 @@ module.exports = { // file: lib/common/plugin/Acceleration.js define("cordova/plugin/Acceleration", function(require, exports, module) { -var Acceleration = function(x, y, z) { +var Acceleration = function(x, y, z, timestamp) { this.x = x; this.y = y; this.z = z; - this.timestamp = new Date().getTime(); + this.timestamp = timestamp || (new Date()).getTime(); }; module.exports = Acceleration; @@ -2739,7 +2771,7 @@ FileWriter.prototype.seek = function(offset) { throw new FileError(FileError.INVALID_STATE_ERR); } - if (!offset) { + if (!offset && offset != 0) { return; }