You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2012/11/01 05:54:52 UTC
ios commit: Updated CordovaLibAppTests to 2.2.0 JavaScript,
updated Cordova.plist
Updated Branches:
refs/heads/master 54efb8c35 -> 458ffaab0
Updated CordovaLibAppTests to 2.2.0 JavaScript, updated Cordova.plist
Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/commit/458ffaab
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/458ffaab
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/458ffaab
Branch: refs/heads/master
Commit: 458ffaab08dd02d72874f77fb719e8e7832a172c
Parents: 54efb8c
Author: Shazron Abdullah <sh...@apache.org>
Authored: Wed Oct 31 21:54:44 2012 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Wed Oct 31 21:54:44 2012 -0700
----------------------------------------------------------------------
CordovaLibTests/CordovaLibApp/Cordova.plist | 2 +-
CordovaLibTests/CordovaLibApp/www/cordova.ios.js | 953 ++++++++++++++---
2 files changed, 798 insertions(+), 157 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/458ffaab/CordovaLibTests/CordovaLibApp/Cordova.plist
----------------------------------------------------------------------
diff --git a/CordovaLibTests/CordovaLibApp/Cordova.plist b/CordovaLibTests/CordovaLibApp/Cordova.plist
index 61e39ea..8bbb2a1 100644
--- a/CordovaLibTests/CordovaLibApp/Cordova.plist
+++ b/CordovaLibTests/CordovaLibApp/Cordova.plist
@@ -25,7 +25,7 @@
<key>OpenAllWhitelistURLsInWebView</key>
<false/>
<key>BackupWebStorage</key>
- <true/>
+ <string>cloud</string>
<key>ExternalHosts</key>
<array/>
<key>Plugins</key>
http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/458ffaab/CordovaLibTests/CordovaLibApp/www/cordova.ios.js
----------------------------------------------------------------------
diff --git a/CordovaLibTests/CordovaLibApp/www/cordova.ios.js b/CordovaLibTests/CordovaLibApp/www/cordova.ios.js
index cce90a9..5e3a454 100644
--- a/CordovaLibTests/CordovaLibApp/www/cordova.ios.js
+++ b/CordovaLibTests/CordovaLibApp/www/cordova.ios.js
@@ -1,6 +1,6 @@
-// commit d30179b30152b9383a80637e609cf2d785e1aa3e
+// commit 02b91c5313ff37d74a58f71775170afd360f4a1f
-// File generated at :: Tue Sep 18 2012 11:34:26 GMT-0400 (EDT)
+// File generated at :: Wed Oct 31 2012 14:34:26 GMT-0700 (PDT)
/*
Licensed to the Apache Software Foundation (ASF) under one
@@ -137,7 +137,7 @@ window.addEventListener = function(evt, handler, capture) {
document.removeEventListener = function(evt, handler, capture) {
var e = evt.toLowerCase();
- // If unsubcribing from an event that is handled by a plugin
+ // If unsubscribing from an event that is handled by a plugin
if (typeof documentEventHandlers[e] != "undefined") {
documentEventHandlers[e].unsubscribe(handler);
} else {
@@ -147,7 +147,7 @@ document.removeEventListener = function(evt, handler, capture) {
window.removeEventListener = function(evt, handler, capture) {
var e = evt.toLowerCase();
- // If unsubcribing from an event that is handled by a plugin
+ // If unsubscribing from an event that is handled by a plugin
if (typeof windowEventHandlers[e] != "undefined") {
windowEventHandlers[e].unsubscribe(handler);
} else {
@@ -196,7 +196,7 @@ var cordova = {
delete documentEventHandlers[event];
},
/**
- * Retreive original event handlers that were replaced by Cordova
+ * Retrieve original event handlers that were replaced by Cordova
*
* @return object
*/
@@ -206,7 +206,7 @@ var cordova = {
},
/**
* Method to fire event from native code
- * bNoDetach is required for events which cause an exception which needs to be caught in native code
+ * bNoDetach is required for events which cause an exception which needs to be caught in native code
*/
fireDocumentEvent: function(type, data, bNoDetach) {
var evt = createEvent(type, data);
@@ -234,18 +234,12 @@ var cordova = {
}
},
- // TODO: iOS only
- // This queue holds the currently executing command and all pending
- // commands executed with cordova.exec().
- commandQueue:[],
- // Indicates if we're currently in the middle of flushing the command
- // queue on the native side.
- commandQueueFlushing:false,
- // END TODO
/**
* Plugin callback mechanism.
*/
- callbackId: 0,
+ // Randomize the starting callbackId to avoid collisions after refreshing or navigating.
+ // This way, it's very unlikely that any new callback would get the same callbackId as an old callback.
+ callbackId: Math.floor(Math.random() * 2000000000),
callbacks: {},
callbackStatus: {
NO_RESULT: 0,
@@ -412,7 +406,7 @@ function recursiveMerge(target, src) {
module.exports = {
build: function (objects) {
return {
- intoButDontClobber: function (target) {
+ intoButDoNotClobber: function (target) {
include(target, objects, false, false);
},
intoAndClobber: function(target) {
@@ -500,8 +494,8 @@ var Channel = function(type, sticky) {
if (!(--i)) h();
};
for (var j=0; j<len; j++) {
- if (c[j].state == 0) {
- throw Error('Can only use join with sticky channels.')
+ if (c[j].state === 0) {
+ throw Error('Can only use join with sticky channels.');
}
c[j].subscribe(f);
}
@@ -600,7 +594,7 @@ Channel.prototype.unsubscribe = function(f) {
if (handler) {
delete this.handlers[guid];
this.numHandlers--;
- if (this.numHandlers == 0) {
+ if (this.numHandlers === 0) {
this.onHasSubscribersChange && this.onHasSubscribersChange();
}
}
@@ -673,6 +667,36 @@ module.exports = channel;
});
+// file: lib/common/commandProxy.js
+define("cordova/commandProxy", function(require, exports, module) {
+
+
+// internal map of proxy function
+var CommandProxyMap = {};
+
+module.exports = {
+
+ // example: cordova.commandProxy.add("Accelerometer",{getCurrentAcceleration: function(successCallback, errorCallback, options) {...},...);
+ add:function(id,proxyObj) {
+ console.log("adding proxy for " + id);
+ CommandProxyMap[id] = proxyObj;
+ return proxyObj;
+ },
+
+ // cordova.commandProxy.remove("Accelerometer");
+ remove:function(id) {
+ var proxy = CommandProxyMap[id];
+ delete CommandProxyMap[id];
+ CommandProxyMap[id] = null;
+ return proxy;
+ },
+
+ get:function(service,action) {
+ return ( CommandProxyMap[service] ? CommandProxyMap[service][action] : null );
+ }
+};
+});
+
// file: lib/common/common.js
define("cordova/common", function(require, exports, module) {
@@ -729,6 +753,9 @@ module.exports = {
geolocation: {
path: 'cordova/plugin/geolocation'
},
+ globalization: {
+ path: 'cordova/plugin/globalization'
+ },
network: {
children: {
connection: {
@@ -844,6 +871,9 @@ module.exports = {
Flags: {
path: 'cordova/plugin/Flags'
},
+ GlobalizationError: {
+ path: 'cordova/plugin/GlobalizationError'
+ },
LocalFileSystem: {
path: 'cordova/plugin/LocalFileSystem'
},
@@ -893,7 +923,6 @@ define("cordova/exec", function(require, exports, module) {
*/
var cordova = require('cordova'),
channel = require('cordova/channel'),
- nativecomm = require('cordova/plugin/ios/nativecomm'),
utils = require('cordova/utils'),
jsToNativeModes = {
IFRAME_NAV: 0,
@@ -902,11 +931,14 @@ var cordova = require('cordova'),
XHR_OPTIONAL_PAYLOAD: 3
},
// XHR mode does not work on iOS 4.2, so default to IFRAME_NAV for such devices.
- // XHR mode's main advantage is working around a bug in -webkit-scroll, which
+ // XHR mode's main advantage is working around a bug in -webkit-scroll, which
// doesn't exist in 4.X devices anyways.
bridgeMode = navigator.userAgent.indexOf(' 4_') == -1 ? jsToNativeModes.XHR_NO_PAYLOAD : jsToNativeModes.IFRAME_NAV,
execIframe,
- execXhr;
+ execXhr,
+ requestCount = 0,
+ commandQueue = [], // Contains pending JS->Native messages.
+ isInContextOfEvalJs = 0;
function createExecIframe() {
var iframe = document.createElement("iframe");
@@ -916,13 +948,13 @@ function createExecIframe() {
}
function shouldBundleCommandJson() {
- if (bridgeMode == 2) {
+ if (bridgeMode == jsToNativeModes.XHR_WITH_PAYLOAD) {
return true;
}
- if (bridgeMode == 3) {
+ if (bridgeMode == jsToNativeModes.XHR_OPTIONAL_PAYLOAD) {
var payloadLength = 0;
- for (var i = 0; i < cordova.commandQueue.length; ++i) {
- payloadLength += cordova.commandQueue[i].length;
+ for (var i = 0; i < commandQueue.length; ++i) {
+ payloadLength += commandQueue[i].length;
}
// The value here was determined using the benchmark within CordovaLibApp on an iPad 3.
return payloadLength < 4500;
@@ -973,21 +1005,26 @@ function iOSExec() {
// Stringify and queue the command. We stringify to command now to
// effectively clone the command arguments in case they are mutated before
// the command is executed.
- cordova.commandQueue.push(JSON.stringify(command));
-
- // If the queue length is 1, then that means it was empty before we queued
- // the given command, so let the native side know that we have some
- // commands to execute, unless the queue is currently being flushed, in
- // which case the command will be picked up without notification.
- if (cordova.commandQueue.length == 1 && !cordova.commandQueueFlushing) {
- if (bridgeMode) {
+ commandQueue.push(JSON.stringify(command));
+
+ if (!isInContextOfEvalJs) {
+ if (bridgeMode != jsToNativeModes.IFRAME_NAV) {
+ // Re-using the XHR improves exec() performance by about 10%.
+ // It is possible for a native stringByEvaluatingJavascriptFromString call
+ // to cause us to reach this point when a request is already in progress,
+ // so we check the readyState to guard agains re-using an inprogress XHR.
+ // Refer to CB-1404.
+ if (execXhr && execXhr.readyState != 4) {
+ execXhr = null;
+ }
execXhr = execXhr || new XMLHttpRequest();
- // Changeing this to a GET will make the XHR reach the URIProtocol on 4.2.
+ // Changing this to a GET will make the XHR reach the URIProtocol on 4.2.
// For some reason it still doesn't work though...
- execXhr.open('HEAD', "file:///!gap_exec", true);
+ execXhr.open('HEAD', "/!gap_exec", true);
execXhr.setRequestHeader('vc', cordova.iOSVCAddr);
+ execXhr.setRequestHeader('rc', ++requestCount);
if (shouldBundleCommandJson()) {
- execXhr.setRequestHeader('cmds', nativecomm());
+ execXhr.setRequestHeader('cmds', iOSExec.nativeFetchMessages());
}
execXhr.send(null);
} else {
@@ -1010,6 +1047,34 @@ iOSExec.setJsToNativeBridgeMode = function(mode) {
bridgeMode = mode;
};
+iOSExec.nativeFetchMessages = function() {
+ // Each entry in commandQueue is a JSON string already.
+ if (!commandQueue.length) {
+ return '';
+ }
+ var json = '[' + commandQueue.join(',') + ']';
+ commandQueue.length = 0;
+ return json;
+};
+
+iOSExec.nativeCallback = function(callbackId, status, payload, keepCallback) {
+ return iOSExec.nativeEvalAndFetch(function() {
+ var success = status == 0 || status == 1;
+ cordova.callbackFromNative(callbackId, success, status, payload, keepCallback);
+ });
+};
+
+iOSExec.nativeEvalAndFetch = function(func) {
+ // This shouldn't be nested, but better to be safe.
+ isInContextOfEvalJs++;
+ try {
+ func();
+ return iOSExec.nativeFetchMessages();
+ } finally {
+ isInContextOfEvalJs--;
+ }
+};
+
module.exports = iOSExec;
});
@@ -1109,6 +1174,7 @@ for (var key in Camera) {
* @param {Object} options
*/
cameraExport.getPicture = function(successCallback, errorCallback, options) {
+ options = options || {};
// successCallback required
if (typeof successCallback != "function") {
console.log("Camera Error: successCallback is not a function");
@@ -1122,9 +1188,9 @@ cameraExport.getPicture = function(successCallback, errorCallback, options) {
}
var quality = 50;
- if (options && typeof options.quality == "number") {
+ if (typeof options.quality == "number") {
quality = options.quality;
- } else if (options && typeof options.quality == "string") {
+ } else if (typeof options.quality == "string") {
var qlity = parseInt(options.quality, 10);
if (isNaN(qlity) === false) {
quality = qlity.valueOf();
@@ -1347,7 +1413,7 @@ define("cordova/plugin/CompassError", function(require, exports, module) {
/**
* CompassError.
- * An error code assigned by an implementation when an error has occured
+ * An error code assigned by an implementation when an error has occurred
* @constructor
*/
var CompassError = function(err) {
@@ -1633,7 +1699,7 @@ define("cordova/plugin/ContactError", function(require, exports, module) {
/**
* ContactError.
- * An error code assigned by an implementation when an error has occured
+ * An error code assigned by an implementation when an error has occurred
* @constructor
*/
var ContactError = function(err) {
@@ -1840,7 +1906,7 @@ DirectoryEntry.prototype.createReader = function() {
* Creates or looks up a directory
*
* @param {DOMString} path either a relative or absolute path from this directory in which to look up or create a directory
- * @param {Flags} options to create or excluively create the directory
+ * @param {Flags} options to create or exclusively create the directory
* @param {Function} successCallback is called with the new entry
* @param {Function} errorCallback is called with a FileError
*/
@@ -1872,7 +1938,7 @@ DirectoryEntry.prototype.removeRecursively = function(successCallback, errorCall
* Creates or looks up a file
*
* @param {DOMString} path either a relative or absolute path from this directory in which to look up or create a file
- * @param {Flags} options to create or excluively create the file
+ * @param {Flags} options to create or exclusively create the file
* @param {Function} successCallback is called with the new entry
* @param {Function} errorCallback is called with a FileError
*/
@@ -2316,7 +2382,7 @@ var FileReader = function() {
// Event handlers
this.onloadstart = null; // When the read starts.
- this.onprogress = null; // While reading (and decoding) file or fileBlob data, and reporting partial file data (progess.loaded/progress.total)
+ this.onprogress = null; // While reading (and decoding) file or fileBlob data, and reporting partial file data (progress.loaded/progress.total)
this.onload = null; // When the read has successfully completed.
this.onerror = null; // When the read has failed (see errors).
this.onloadend = null; // When the request has completed (either in success or failure).
@@ -2570,13 +2636,27 @@ module.exports = FileSystem;
define("cordova/plugin/FileTransfer", function(require, exports, module) {
var exec = require('cordova/exec'),
- FileTransferError = require('cordova/plugin/FileTransferError');
+ FileTransferError = require('cordova/plugin/FileTransferError'),
+ ProgressEvent = require('cordova/plugin/ProgressEvent');
+
+function newProgressEvent(result) {
+ var pe = new ProgressEvent();
+ pe.lengthComputable = result.lengthComputable;
+ pe.loaded = result.loaded;
+ pe.total = result.total;
+ return pe;
+}
+
+var idCounter = 0;
/**
* FileTransfer uploads a file to a remote server.
* @constructor
*/
-var FileTransfer = function() {};
+var FileTransfer = function() {
+ this._id = ++idCounter;
+ this.onprogress = null; // optional callback
+};
/**
* Given an absolute file path, uploads a file on the device to a remote server
@@ -2619,7 +2699,17 @@ FileTransfer.prototype.upload = function(filePath, server, successCallback, erro
errorCallback(error);
};
- exec(successCallback, fail, 'FileTransfer', 'upload', [filePath, server, fileKey, fileName, mimeType, params, trustAllHosts, chunkedMode, headers]);
+ var self = this;
+ var win = function(result) {
+ if (typeof result.lengthComputable != "undefined") {
+ if (self.onprogress) {
+ return self.onprogress(newProgressEvent(result));
+ }
+ } else {
+ return successCallback(result);
+ }
+ };
+ exec(win, fail, 'FileTransfer', 'upload', [filePath, server, fileKey, fileName, mimeType, params, trustAllHosts, chunkedMode, headers, this._id]);
};
/**
@@ -2628,23 +2718,31 @@ FileTransfer.prototype.upload = function(filePath, server, successCallback, erro
* @param target {String} Full path of the file on the device
* @param successCallback (Function} Callback to be invoked when upload has completed
* @param errorCallback {Function} Callback to be invoked upon error
+ * @param trustAllHosts {Boolean} Optional trust all hosts (e.g. for self-signed certs), defaults to false
*/
-FileTransfer.prototype.download = function(source, target, successCallback, errorCallback) {
+FileTransfer.prototype.download = function(source, target, successCallback, errorCallback, trustAllHosts) {
// sanity parameter checking
if (!source || !target) throw new Error("FileTransfer.download requires source URI and target URI parameters at the minimum.");
+ var self = this;
var win = function(result) {
- var entry = null;
- if (result.isDirectory) {
- entry = new (require('cordova/plugin/DirectoryEntry'))();
- }
- else if (result.isFile) {
- entry = new (require('cordova/plugin/FileEntry'))();
+ if (typeof result.lengthComputable != "undefined") {
+ if (self.onprogress) {
+ return self.onprogress(newProgressEvent(result));
+ }
+ } else {
+ var entry = null;
+ if (result.isDirectory) {
+ entry = new (require('cordova/plugin/DirectoryEntry'))();
+ }
+ else if (result.isFile) {
+ entry = new (require('cordova/plugin/FileEntry'))();
+ }
+ entry.isDirectory = result.isDirectory;
+ entry.isFile = result.isFile;
+ entry.name = result.name;
+ entry.fullPath = result.fullPath;
+ successCallback(entry);
}
- entry.isDirectory = result.isDirectory;
- entry.isFile = result.isFile;
- entry.name = result.name;
- entry.fullPath = result.fullPath;
- successCallback(entry);
};
var fail = function(e) {
@@ -2652,7 +2750,16 @@ FileTransfer.prototype.download = function(source, target, successCallback, erro
errorCallback(error);
};
- exec(win, errorCallback, 'FileTransfer', 'download', [source, target]);
+ exec(win, fail, 'FileTransfer', 'download', [source, target, trustAllHosts, this._id]);
+};
+
+/**
+ * Aborts the ongoing file transfer on this object
+ * @param successCallback {Function} Callback to be invoked upon success
+ * @param errorCallback {Function} Callback to be invoked upon error
+ */
+FileTransfer.prototype.abort = function(successCallback, errorCallback) {
+ exec(successCallback, errorCallback, 'FileTransfer', 'abort', [this._id]);
};
module.exports = FileTransfer;
@@ -2676,6 +2783,7 @@ var FileTransferError = function(code, source, target, status) {
FileTransferError.FILE_NOT_FOUND_ERR = 1;
FileTransferError.INVALID_URL_ERR = 2;
FileTransferError.CONNECTION_ERR = 3;
+FileTransferError.ABORT_ERR = 4;
module.exports = FileTransferError;
@@ -3003,6 +3111,32 @@ module.exports = Flags;
});
+// file: lib/common/plugin/GlobalizationError.js
+define("cordova/plugin/GlobalizationError", function(require, exports, module) {
+
+
+/**
+ * Globalization error object
+ *
+ * @constructor
+ * @param code
+ * @param message
+ */
+var GlobalizationError = function(code, message) {
+ this.code = code || null;
+ this.message = message || '';
+};
+
+// Globalization error codes
+GlobalizationError.UNKNOWN_ERROR = 0;
+GlobalizationError.FORMATTING_ERROR = 1;
+GlobalizationError.PARSING_ERROR = 2;
+GlobalizationError.PATTERN_ERROR = 3;
+
+module.exports = GlobalizationError;
+
+});
+
// file: lib/common/plugin/LocalFileSystem.js
define("cordova/plugin/LocalFileSystem", function(require, exports, module) {
@@ -3199,13 +3333,13 @@ Media.onStatus = function(id, msgType, value) {
media._duration = value;
break;
case Media.MEDIA_ERROR :
- media.errorCallback && media.errorCallback(value);
+ media.errorCallback && media.errorCallback(value);
break;
case Media.MEDIA_POSITION :
media._position = Number(value);
break;
default :
- console && console.error && console.error("Unhandled Media.onStatus :: " + msgType);
+ console && console.error && console.error("Unhandled Media.onStatus :: " + msgType);
break;
}
}
@@ -3236,23 +3370,26 @@ we should simply use a literal :
errorCallbackFunction( {'code':3} );
*/
-if(!MediaError) {
- var MediaError = function(code, msg) {
+ var _MediaError = window.MediaError;
+
+
+if(!_MediaError) {
+ window.MediaError = _MediaError = function(code, msg) {
this.code = (typeof code != 'undefined') ? code : null;
this.message = msg || ""; // message is NON-standard! do not use!
};
}
-MediaError.MEDIA_ERR_NONE_ACTIVE = MediaError.MEDIA_ERR_NONE_ACTIVE || 0;
-MediaError.MEDIA_ERR_ABORTED = MediaError.MEDIA_ERR_ABORTED || 1;
-MediaError.MEDIA_ERR_NETWORK = MediaError.MEDIA_ERR_NETWORK || 2;
-MediaError.MEDIA_ERR_DECODE = MediaError.MEDIA_ERR_DECODE || 3;
-MediaError.MEDIA_ERR_NONE_SUPPORTED = MediaError.MEDIA_ERR_NONE_SUPPORTED || 4;
-// TODO: MediaError.MEDIA_ERR_NONE_SUPPORTED is legacy, the W3 spec now defines it as below.
+_MediaError.MEDIA_ERR_NONE_ACTIVE = _MediaError.MEDIA_ERR_NONE_ACTIVE || 0;
+_MediaError.MEDIA_ERR_ABORTED = _MediaError.MEDIA_ERR_ABORTED || 1;
+_MediaError.MEDIA_ERR_NETWORK = _MediaError.MEDIA_ERR_NETWORK || 2;
+_MediaError.MEDIA_ERR_DECODE = _MediaError.MEDIA_ERR_DECODE || 3;
+_MediaError.MEDIA_ERR_NONE_SUPPORTED = _MediaError.MEDIA_ERR_NONE_SUPPORTED || 4;
+// TODO: MediaError.MEDIA_ERR_NONE_SUPPORTED is legacy, the W3 spec now defines it as below.
// as defined by http://dev.w3.org/html5/spec-author-view/video.html#error-codes
-MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED = MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED || 4;
+_MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED = _MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED || 4;
-module.exports = MediaError;
+module.exports = _MediaError;
});
@@ -3493,7 +3630,7 @@ function removeListeners(l) {
var accelerometer = {
/**
- * Asynchronously aquires the current acceleration.
+ * Asynchronously acquires the current acceleration.
*
* @param {Function} successCallback The function to call when the acceleration data is available
* @param {Function} errorCallback The function to call when there is an error getting the acceleration data. (OPTIONAL)
@@ -3524,7 +3661,7 @@ var accelerometer = {
},
/**
- * Asynchronously aquires the acceleration repeatedly at a given interval.
+ * Asynchronously acquires the acceleration repeatedly at a given interval.
*
* @param {Function} successCallback The function to call each time the acceleration data is available
* @param {Function} errorCallback The function to call when there is an error getting the acceleration data. (OPTIONAL)
@@ -3618,7 +3755,6 @@ var Battery = function() {
for (var key in this.channels) {
this.channels[key].onHasSubscribersChange = Battery.onHasSubscribersChange;
}
-
};
/**
* Event handlers for when callbacks get registered for the battery.
@@ -4011,7 +4147,7 @@ console.table = function(data, columns) {
//------------------------------------------------------------------------------
// return a new function that calls both functions passed as args
//------------------------------------------------------------------------------
-function wrapperedOrigCall(orgFunc, newFunc) {
+function wrappedOrigCall(orgFunc, newFunc) {
return function() {
var args = [].slice.call(arguments);
try { orgFunc.apply(WinConsole, args); } catch (e) {}
@@ -4026,7 +4162,7 @@ function wrapperedOrigCall(orgFunc, newFunc) {
//------------------------------------------------------------------------------
for (var key in console) {
if (typeof WinConsole[key] == "function") {
- console[key] = wrapperedOrigCall(WinConsole[key], console[key]);
+ console[key] = wrappedOrigCall(WinConsole[key], console[key]);
}
}
@@ -4171,7 +4307,7 @@ define("cordova/plugin/echo", function(require, exports, module) {
var exec = require('cordova/exec');
/**
- * Sends the given message through exec() to the Echo plugink, which sends it back to the successCallback.
+ * Sends the given message through exec() to the Echo plugin, which sends it back to the successCallback.
* @param successCallback invoked with a FileSystem object
* @param errorCallback invoked if error occurs retrieving file system
* @param message The string to be echoed.
@@ -4238,7 +4374,7 @@ function createTimeout(errorCallback, timeout) {
var geolocation = {
lastPosition:null, // reference to last known (cached) position returned
/**
- * Asynchronously aquires the current position.
+ * Asynchronously acquires the current position.
*
* @param {Function} successCallback The function to call when the position data is available
* @param {Function} errorCallback The function to call when there is an error getting the heading position. (OPTIONAL)
@@ -4384,6 +4520,545 @@ module.exports = geolocation;
});
+// file: lib/common/plugin/globalization.js
+define("cordova/plugin/globalization", function(require, exports, module) {
+
+var exec = require('cordova/exec'),
+ GlobalizationError = require('cordova/plugin/GlobalizationError');
+
+var globalization = {
+
+/**
+* Returns the string identifier for the client's current language.
+* It returns the language identifier string to the successCB callback with a
+* properties object as a parameter. If there is an error getting the language,
+* then the errorCB callback is invoked.
+*
+* @param {Function} successCB
+* @param {Function} errorCB
+*
+* @return Object.value {String}: The language identifier
+*
+* @error GlobalizationError.UNKNOWN_ERROR
+*
+* Example
+* globalization.getPreferredLanguage(function (language) {alert('language:' + language.value + '\n');},
+* function () {});
+*/
+getPreferredLanguage:function(successCB, failureCB) {
+ // successCallback required
+ if (typeof successCB != "function") {
+ console.log("Globalization.getPreferredLanguage Error: successCB is not a function");
+ return;
+ }
+
+ // errorCallback required
+ if (typeof failureCB != "function") {
+ console.log("Globalization.getPreferredLanguage Error: failureCB is not a function");
+ return;
+ }
+
+ exec(successCB, failureCB, "Globalization","getPreferredLanguage", []);
+},
+
+/**
+* Returns the string identifier for the client's current locale setting.
+* It returns the locale identifier string to the successCB callback with a
+* properties object as a parameter. If there is an error getting the locale,
+* then the errorCB callback is invoked.
+*
+* @param {Function} successCB
+* @param {Function} errorCB
+*
+* @return Object.value {String}: The locale identifier
+*
+* @error GlobalizationError.UNKNOWN_ERROR
+*
+* Example
+* globalization.getLocaleName(function (locale) {alert('locale:' + locale.value + '\n');},
+* function () {});
+*/
+getLocaleName:function(successCB, failureCB) {
+ // successCallback required
+ if (typeof successCB != "function") {
+ console.log("Globalization.getLocaleName Error: successCB is not a function");
+ return;
+ }
+
+ // errorCallback required
+ if (typeof failureCB != "function") {
+ console.log("Globalization.getLocaleName Error: failureCB is not a function");
+ return;
+ }
+ exec(successCB, failureCB, "Globalization","getLocaleName", []);
+},
+
+
+/**
+* Returns a date formatted as a string according to the client's user preferences and
+* calendar using the time zone of the client. It returns the formatted date string to the
+* successCB callback with a properties object as a parameter. If there is an error
+* formatting the date, then the errorCB callback is invoked.
+*
+* The defaults are: formatLenght="short" and selector="date and time"
+*
+* @param {Date} date
+* @param {Function} successCB
+* @param {Function} errorCB
+* @param {Object} options {optional}
+* formatLength {String}: 'short', 'medium', 'long', or 'full'
+* selector {String}: 'date', 'time', or 'date and time'
+*
+* @return Object.value {String}: The localized date string
+*
+* @error GlobalizationError.FORMATTING_ERROR
+*
+* Example
+* globalization.dateToString(new Date(),
+* function (date) {alert('date:' + date.value + '\n');},
+* function (errorCode) {alert(errorCode);},
+* {formatLength:'short'});
+*/
+dateToString:function(date, successCB, failureCB, options) {
+ // successCallback required
+ if (typeof successCB != "function") {
+ console.log("Globalization.dateToString Error: successCB is not a function");
+ return;
+ }
+
+ // errorCallback required
+ if (typeof failureCB != "function") {
+ console.log("Globalization.dateToString Error: failureCB is not a function");
+ return;
+ }
+
+
+ if (date instanceof Date){
+ var dateValue;
+ dateValue = date.valueOf();
+ exec(successCB, failureCB, "Globalization", "dateToString", [{"date": dateValue, "options": options}]);
+ }
+ else {
+ console.log("Globalization.dateToString Error: date is not a Date object");
+ }
+},
+
+
+/**
+* Parses a date formatted as a string according to the client's user
+* preferences and calendar using the time zone of the client and returns
+* the corresponding date object. It returns the date to the successCB
+* callback with a properties object as a parameter. If there is an error
+* parsing the date string, then the errorCB callback is invoked.
+*
+* The defaults are: formatLength="short" and selector="date and time"
+*
+* @param {String} dateString
+* @param {Function} successCB
+* @param {Function} errorCB
+* @param {Object} options {optional}
+* formatLength {String}: 'short', 'medium', 'long', or 'full'
+* selector {String}: 'date', 'time', or 'date and time'
+*
+* @return Object.year {Number}: The four digit year
+* Object.month {Number}: The month from (0 - 11)
+* Object.day {Number}: The day from (1 - 31)
+* Object.hour {Number}: The hour from (0 - 23)
+* Object.minute {Number}: The minute from (0 - 59)
+* Object.second {Number}: The second from (0 - 59)
+* Object.millisecond {Number}: The milliseconds (from 0 - 999),
+* not available on all platforms
+*
+* @error GlobalizationError.PARSING_ERROR
+*
+* Example
+* globalization.stringToDate('4/11/2011',
+* function (date) { alert('Month:' + date.month + '\n' +
+* 'Day:' + date.day + '\n' +
+* 'Year:' + date.year + '\n');},
+* function (errorCode) {alert(errorCode);},
+* {selector:'date'});
+*/
+stringToDate:function(dateString, successCB, failureCB, options) {
+ // successCallback required
+ if (typeof successCB != "function") {
+ console.log("Globalization.stringToDate Error: successCB is not a function");
+ return;
+ }
+
+ // errorCallback required
+ if (typeof failureCB != "function") {
+ console.log("Globalization.stringToDate Error: failureCB is not a function");
+ return;
+ }
+ if (typeof dateString == "string"){
+ exec(successCB, failureCB, "Globalization", "stringToDate", [{"dateString": dateString, "options": options}]);
+ }
+ else {
+ console.log("Globalization.stringToDate Error: dateString is not a string");
+ }
+},
+
+
+/**
+* Returns a pattern string for formatting and parsing dates according to the client's
+* user preferences. It returns the pattern to the successCB callback with a
+* properties object as a parameter. If there is an error obtaining the pattern,
+* then the errorCB callback is invoked.
+*
+* The defaults are: formatLength="short" and selector="date and time"
+*
+* @param {Function} successCB
+* @param {Function} errorCB
+* @param {Object} options {optional}
+* formatLength {String}: 'short', 'medium', 'long', or 'full'
+* selector {String}: 'date', 'time', or 'date and time'
+*
+* @return Object.pattern {String}: The date and time pattern for formatting and parsing dates.
+* The patterns follow Unicode Technical Standard #35
+* http://unicode.org/reports/tr35/tr35-4.html
+* Object.timezone {String}: The abbreviated name of the time zone on the client
+* Object.utc_offset {Number}: The current difference in seconds between the client's
+* time zone and coordinated universal time.
+* Object.dst_offset {Number}: The current daylight saving time offset in seconds
+* between the client's non-daylight saving's time zone
+* and the client's daylight saving's time zone.
+*
+* @error GlobalizationError.PATTERN_ERROR
+*
+* Example
+* globalization.getDatePattern(
+* function (date) {alert('pattern:' + date.pattern + '\n');},
+* function () {},
+* {formatLength:'short'});
+*/
+getDatePattern:function(successCB, failureCB, options) {
+ // successCallback required
+ if (typeof successCB != "function") {
+ console.log("Globalization.getDatePattern Error: successCB is not a function");
+ return;
+ }
+
+ // errorCallback required
+ if (typeof failureCB != "function") {
+ console.log("Globalization.getDatePattern Error: failureCB is not a function");
+ return;
+ }
+
+ exec(successCB, failureCB, "Globalization", "getDatePattern", [{"options": options}]);
+},
+
+
+/**
+* Returns an array of either the names of the months or days of the week
+* according to the client's user preferences and calendar. It returns the array of names to the
+* successCB callback with a properties object as a parameter. If there is an error obtaining the
+* names, then the errorCB callback is invoked.
+*
+* The defaults are: type="wide" and item="months"
+*
+* @param {Function} successCB
+* @param {Function} errorCB
+* @param {Object} options {optional}
+* type {String}: 'narrow' or 'wide'
+* item {String}: 'months', or 'days'
+*
+* @return Object.value {Array{String}}: The array of names starting from either
+* the first month in the year or the
+* first day of the week.
+* @error GlobalizationError.UNKNOWN_ERROR
+*
+* Example
+* globalization.getDateNames(function (names) {
+* for(var i = 0; i < names.value.length; i++) {
+* alert('Month:' + names.value[i] + '\n');}},
+* function () {});
+*/
+getDateNames:function(successCB, failureCB, options) {
+ // successCallback required
+ if (typeof successCB != "function") {
+ console.log("Globalization.getDateNames Error: successCB is not a function");
+ return;
+ }
+
+ // errorCallback required
+ if (typeof failureCB != "function") {
+ console.log("Globalization.getDateNames Error: failureCB is not a function");
+ return;
+ }
+ exec(successCB, failureCB, "Globalization", "getDateNames", [{"options": options}]);
+},
+
+/**
+* Returns whether daylight savings time is in effect for a given date using the client's
+* time zone and calendar. It returns whether or not daylight savings time is in effect
+* to the successCB callback with a properties object as a parameter. If there is an error
+* reading the date, then the errorCB callback is invoked.
+*
+* @param {Date} date
+* @param {Function} successCB
+* @param {Function} errorCB
+*
+* @return Object.dst {Boolean}: The value "true" indicates that daylight savings time is
+* in effect for the given date and "false" indicate that it is not.
+*
+* @error GlobalizationError.UNKNOWN_ERROR
+*
+* Example
+* globalization.isDayLightSavingsTime(new Date(),
+* function (date) {alert('dst:' + date.dst + '\n');}
+* function () {});
+*/
+isDayLightSavingsTime:function(date, successCB, failureCB) {
+ // successCallback required
+ if (typeof successCB != "function") {
+ console.log("Globalization.isDayLightSavingsTime Error: successCB is not a function");
+ return;
+ }
+
+ // errorCallback required
+ if (typeof failureCB != "function") {
+ console.log("Globalization.isDayLightSavingsTime Error: failureCB is not a function");
+ return;
+ }
+
+
+ if (date instanceof Date){
+ var dateValue;
+ dateValue = date.valueOf();
+ exec(successCB, failureCB, "Globalization", "isDayLightSavingsTime", [{"date": dateValue}]);
+ }
+ else {
+ console.log("Globalization.isDayLightSavingsTime Error: date is not a Date object");
+ }
+
+},
+
+/**
+* Returns the first day of the week according to the client's user preferences and calendar.
+* The days of the week are numbered starting from 1 where 1 is considered to be Sunday.
+* It returns the day to the successCB callback with a properties object as a parameter.
+* If there is an error obtaining the pattern, then the errorCB callback is invoked.
+*
+* @param {Function} successCB
+* @param {Function} errorCB
+*
+* @return Object.value {Number}: The number of the first day of the week.
+*
+* @error GlobalizationError.UNKNOWN_ERROR
+*
+* Example
+* globalization.getFirstDayOfWeek(function (day)
+* { alert('Day:' + day.value + '\n');},
+* function () {});
+*/
+getFirstDayOfWeek:function(successCB, failureCB) {
+ // successCallback required
+ if (typeof successCB != "function") {
+ console.log("Globalization.getFirstDayOfWeek Error: successCB is not a function");
+ return;
+ }
+
+ // errorCallback required
+ if (typeof failureCB != "function") {
+ console.log("Globalization.getFirstDayOfWeek Error: failureCB is not a function");
+ return;
+ }
+
+ exec(successCB, failureCB, "Globalization", "getFirstDayOfWeek", []);
+},
+
+
+/**
+* Returns a number formatted as a string according to the client's user preferences.
+* It returns the formatted number string to the successCB callback with a properties object as a
+* parameter. If there is an error formatting the number, then the errorCB callback is invoked.
+*
+* The defaults are: type="decimal"
+*
+* @param {Number} number
+* @param {Function} successCB
+* @param {Function} errorCB
+* @param {Object} options {optional}
+* type {String}: 'decimal', "percent", or 'currency'
+*
+* @return Object.value {String}: The formatted number string.
+*
+* @error GlobalizationError.FORMATTING_ERROR
+*
+* Example
+* globalization.numberToString(3.25,
+* function (number) {alert('number:' + number.value + '\n');},
+* function () {},
+* {type:'decimal'});
+*/
+numberToString:function(number, successCB, failureCB, options) {
+ // successCallback required
+ if (typeof successCB != "function") {
+ console.log("Globalization.numberToString Error: successCB is not a function");
+ return;
+ }
+
+ // errorCallback required
+ if (typeof failureCB != "function") {
+ console.log("Globalization.numberToString Error: failureCB is not a function");
+ return;
+ }
+
+ if(typeof number == "number") {
+ exec(successCB, failureCB, "Globalization", "numberToString", [{"number": number, "options": options}]);
+ }
+ else {
+ console.log("Globalization.numberToString Error: number is not a number");
+ }
+},
+
+/**
+* Parses a number formatted as a string according to the client's user preferences and
+* returns the corresponding number. It returns the number to the successCB callback with a
+* properties object as a parameter. If there is an error parsing the number string, then
+* the errorCB callback is invoked.
+*
+* The defaults are: type="decimal"
+*
+* @param {String} numberString
+* @param {Function} successCB
+* @param {Function} errorCB
+* @param {Object} options {optional}
+* type {String}: 'decimal', "percent", or 'currency'
+*
+* @return Object.value {Number}: The parsed number.
+*
+* @error GlobalizationError.PARSING_ERROR
+*
+* Example
+* globalization.stringToNumber('1234.56',
+* function (number) {alert('Number:' + number.value + '\n');},
+* function () { alert('Error parsing number');});
+*/
+stringToNumber:function(numberString, successCB, failureCB, options) {
+ // successCallback required
+ if (typeof successCB != "function") {
+ console.log("Globalization.stringToNumber Error: successCB is not a function");
+ return;
+ }
+
+ // errorCallback required
+ if (typeof failureCB != "function") {
+ console.log("Globalization.stringToNumber Error: failureCB is not a function");
+ return;
+ }
+
+ if(typeof numberString == "string") {
+ exec(successCB, failureCB, "Globalization", "stringToNumber", [{"numberString": numberString, "options": options}]);
+ }
+ else {
+ console.log("Globalization.stringToNumber Error: numberString is not a string");
+ }
+},
+
+/**
+* Returns a pattern string for formatting and parsing numbers according to the client's user
+* preferences. It returns the pattern to the successCB callback with a properties object as a
+* parameter. If there is an error obtaining the pattern, then the errorCB callback is invoked.
+*
+* The defaults are: type="decimal"
+*
+* @param {Function} successCB
+* @param {Function} errorCB
+* @param {Object} options {optional}
+* type {String}: 'decimal', "percent", or 'currency'
+*
+* @return Object.pattern {String}: The number pattern for formatting and parsing numbers.
+* The patterns follow Unicode Technical Standard #35.
+* http://unicode.org/reports/tr35/tr35-4.html
+* Object.symbol {String}: The symbol to be used when formatting and parsing
+* e.g., percent or currency symbol.
+* Object.fraction {Number}: The number of fractional digits to use when parsing and
+* formatting numbers.
+* Object.rounding {Number}: The rounding increment to use when parsing and formatting.
+* Object.positive {String}: The symbol to use for positive numbers when parsing and formatting.
+* Object.negative: {String}: The symbol to use for negative numbers when parsing and formatting.
+* Object.decimal: {String}: The decimal symbol to use for parsing and formatting.
+* Object.grouping: {String}: The grouping symbol to use for parsing and formatting.
+*
+* @error GlobalizationError.PATTERN_ERROR
+*
+* Example
+* globalization.getNumberPattern(
+* function (pattern) {alert('Pattern:' + pattern.pattern + '\n');},
+* function () {});
+*/
+getNumberPattern:function(successCB, failureCB, options) {
+ // successCallback required
+ if (typeof successCB != "function") {
+ console.log("Globalization.getNumberPattern Error: successCB is not a function");
+ return;
+ }
+
+ // errorCallback required
+ if (typeof failureCB != "function") {
+ console.log("Globalization.getNumberPattern Error: failureCB is not a function");
+ return;
+ }
+
+ exec(successCB, failureCB, "Globalization", "getNumberPattern", [{"options": options}]);
+},
+
+/**
+* Returns a pattern string for formatting and parsing currency values according to the client's
+* user preferences and ISO 4217 currency code. It returns the pattern to the successCB callback with a
+* properties object as a parameter. If there is an error obtaining the pattern, then the errorCB
+* callback is invoked.
+*
+* @param {String} currencyCode
+* @param {Function} successCB
+* @param {Function} errorCB
+*
+* @return Object.pattern {String}: The currency pattern for formatting and parsing currency values.
+* The patterns follow Unicode Technical Standard #35
+* http://unicode.org/reports/tr35/tr35-4.html
+* Object.code {String}: The ISO 4217 currency code for the pattern.
+* Object.fraction {Number}: The number of fractional digits to use when parsing and
+* formatting currency.
+* Object.rounding {Number}: The rounding increment to use when parsing and formatting.
+* Object.decimal: {String}: The decimal symbol to use for parsing and formatting.
+* Object.grouping: {String}: The grouping symbol to use for parsing and formatting.
+*
+* @error GlobalizationError.FORMATTING_ERROR
+*
+* Example
+* globalization.getCurrencyPattern('EUR',
+* function (currency) {alert('Pattern:' + currency.pattern + '\n');}
+* function () {});
+*/
+getCurrencyPattern:function(currencyCode, successCB, failureCB) {
+ // successCallback required
+ if (typeof successCB != "function") {
+ console.log("Globalization.getCurrencyPattern Error: successCB is not a function");
+ return;
+ }
+
+ // errorCallback required
+ if (typeof failureCB != "function") {
+ console.log("Globalization.getCurrencyPattern Error: failureCB is not a function");
+ return;
+ }
+
+ if(typeof currencyCode == "string") {
+ exec(successCB, failureCB, "Globalization", "getCurrencyPattern", [{"currencyCode": currencyCode}]);
+ }
+ else {
+ console.log("Globalization.getCurrencyPattern Error: currencyCode is not a currency code");
+ }
+}
+
+};
+
+module.exports = globalization;
+
+});
+
// file: lib/ios/plugin/ios/Contact.js
define("cordova/plugin/ios/Contact", function(require, exports, module) {
@@ -4536,26 +5211,9 @@ define("cordova/plugin/ios/console", function(require, exports, module) {
var exec = require('cordova/exec');
/**
- * This class provides access to the debugging console.
- * @constructor
+ * create a nice string for an object
*/
-var DebugConsole = function() {
- this.winConsole = window.console;
- this.logLevel = DebugConsole.INFO_LEVEL;
-};
-
-// from most verbose, to least verbose
-DebugConsole.ALL_LEVEL = 1; // same as first level
-DebugConsole.INFO_LEVEL = 1;
-DebugConsole.WARN_LEVEL = 2;
-DebugConsole.ERROR_LEVEL = 4;
-DebugConsole.NONE_LEVEL = 8;
-
-DebugConsole.prototype.setLevel = function(level) {
- this.logLevel = level;
-};
-
-var stringify = function(message) {
+function stringify(message) {
try {
if (typeof message === "object" && JSON && JSON.stringify) {
try {
@@ -4570,48 +5228,48 @@ var stringify = function(message) {
} catch (e) {
return e.toString();
}
-};
+}
/**
- * Print a normal log message to the console
- * @param {Object|String} message Message or object to print to the console
+ * Wrapper one of the console logging methods, so that
+ * the Cordova logging native is called, then the original.
*/
-DebugConsole.prototype.log = function(message) {
- if (this.logLevel <= DebugConsole.INFO_LEVEL) {
- exec(null, null, 'Debug Console', 'log', [ stringify(message), { logLevel: 'INFO' } ]);
- }
- else if (this.winConsole && this.winConsole.log) {
- this.winConsole.log(message);
- }
-};
+function wrappedMethod(console, method) {
+ var origMethod = console[method];
-/**
- * Print a warning message to the console
- * @param {Object|String} message Message or object to print to the console
- */
-DebugConsole.prototype.warn = function(message) {
- if (this.logLevel <= DebugConsole.WARN_LEVEL) {
- exec(null, null, 'Debug Console', 'log', [ stringify(message), { logLevel: 'WARN' } ]);
- }
- else if (this.winConsole && this.winConsole.warn) {
- this.winConsole.warn(message);
- }
-};
+ return function(message) {
+ exec(null, null,
+ 'Debug Console', 'log',
+ [ stringify(message), { logLevel: method.toUpperCase() } ]
+ );
-/**
- * Print an error message to the console
- * @param {Object|String} message Message or object to print to the console
- */
-DebugConsole.prototype.error = function(message) {
- if (this.logLevel <= DebugConsole.ERROR_LEVEL) {
- exec(null, null, 'Debug Console', 'log', [ stringify(message), { logLevel: 'ERROR' } ]);
- }
- else if (this.winConsole && this.winConsole.error){
- this.winConsole.error(message);
- }
-};
+ if (!origMethod) return;
+
+ origMethod.apply(console, arguments);
+ };
+}
-module.exports = new DebugConsole();
+var console = window.console || {};
+
+// 2012-10-06 pmuellr - marking setLevel() method and logLevel property
+// on console as deprecated;
+// it didn't do anything useful, since the level constants weren't accessible
+// to anyone
+
+console.setLevel = function() {};
+console.logLevel = 0;
+
+// wrapper the logging messages
+
+var methods = ["log", "debug", "info", "warn", "error"];
+
+for (var i=0; i<methods.length; i++) {
+ var method = methods[i];
+
+ console[method] = wrappedMethod(console, method);
+}
+
+module.exports = console;
});
@@ -4662,23 +5320,6 @@ module.exports = {
});
-// file: lib/ios/plugin/ios/nativecomm.js
-define("cordova/plugin/ios/nativecomm", function(require, exports, module) {
-
-var cordova = require('cordova');
-
-/**
- * Called by native code to retrieve all queued commands and clear the queue.
- */
-module.exports = function() {
- // Each entry in commandQueue is a JSON string already.
- var json = '[' + cordova.commandQueue.join(',') + ']';
- cordova.commandQueue.length = 0;
- return json;
-};
-
-});
-
// file: lib/ios/plugin/ios/notification.js
define("cordova/plugin/ios/notification", function(require, exports, module) {
@@ -5234,7 +5875,7 @@ utils.clone = function(obj) {
};
/**
- * Returns a wrappered version of the function
+ * Returns a wrapped version of the function
*/
utils.close = function(context, func, params) {
if (typeof params == 'undefined') {
@@ -5279,8 +5920,8 @@ utils.extend = (function() {
* Alerts a message in any available way: alert or console.log.
*/
utils.alert = function(msg) {
- if (alert) {
- alert(msg);
+ if (window.alert) {
+ window.alert(msg);
} else if (console && console.log) {
console.log(msg);
}
@@ -5388,7 +6029,7 @@ window.cordova = require('cordova');
// Replace navigator before any modules are required(), to ensure it happens as soon as possible.
// We replace it so that properties that can't be clobbered can instead be overridden.
if (typeof navigator != 'undefined') {
- function CordovaNavigator() {}
+ var CordovaNavigator = function () {};
CordovaNavigator.prototype = navigator;
navigator = new CordovaNavigator();
}
@@ -5405,7 +6046,7 @@ window.cordova = require('cordova');
platform = require('cordova/platform');
// Drop the common globals into the window object, but be nice and don't overwrite anything.
- builder.build(base.objects).intoButDontClobber(window);
+ builder.build(base.objects).intoButDoNotClobber(window);
// Drop the platform-specific globals into the window object
// and clobber any existing object.