Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2AEECD96F for ; Tue, 26 Feb 2013 21:27:59 +0000 (UTC) Received: (qmail 10413 invoked by uid 500); 26 Feb 2013 21:27:59 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 10379 invoked by uid 500); 26 Feb 2013 21:27:59 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@cordova.apache.org Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 10322 invoked by uid 99); 26 Feb 2013 21:27:58 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Feb 2013 21:27:58 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id B57436E5B; Tue, 26 Feb 2013 21:27:58 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: hermwong@apache.org To: commits@cordova.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [2/3] update webos cordova-js files to latest versions 2.5.0 Message-Id: <20130226212758.B57436E5B@tyr.zones.apache.org> Date: Tue, 26 Feb 2013 21:27:58 +0000 (UTC) http://git-wip-us.apache.org/repos/asf/cordova-webos/blob/122c41ff/lib/cordova.webos-debug.js ---------------------------------------------------------------------- diff --git a/lib/cordova.webos-debug.js b/lib/cordova.webos-debug.js index f31088f..ac593ad 100644 --- a/lib/cordova.webos-debug.js +++ b/lib/cordova.webos-debug.js @@ -1,8 +1,8 @@ // Platform: webos -// commit 0f40ae8ab0eb19efecf6dd3be09106feec417bef +// commit 9295524f692a58d61559ecbb2cb4c4cc3554491c -// File generated at :: Tue Feb 19 2013 13:48:03 GMT-0800 (PST) +// File generated at :: Tue Feb 26 2013 12:20:12 GMT-0800 (PST) /* Licensed to the Apache Software Foundation (ASF) under one @@ -26,25 +26,25 @@ ;(function() { try {eval("\nvar require,\n define;\n\n(function () {\n var modules = {};\n // Stack of moduleIds currently being built.\n var requireStack = [];\n // Map of module ID -> index into requireStack of modules currently being built.\n var inProgressModules = {};\n\n function build(module) {\n var factory = module.factory;\n module.exports = {};\n delete module.factory;\n factory(require, module.exports, module);\n return module.exports;\n }\n\n require = function (id) {\n if (!modules[id]) {\n throw \"module \" + id + \" not found\";\n } else if (id in inProgressModules) {\n var cycle = requireStack.slice(inProgressModules[id]).join('->') + '->' + id;\n throw \"Cycle in require graph: \" + cycle;\n }\n if (modules[id].factory) {\n try {\n inProgressModules[id] = requireStack.length;\n requireStack.push(id);\n r eturn build(modules[id]);\n } finally {\n delete inProgressModules[id];\n requireStack.pop();\n }\n }\n return modules[id].exports;\n };\n\n define = function (id, factory) {\n if (modules[id]) {\n throw \"module \" + id + \" already defined\";\n }\n\n modules[id] = {\n id: id,\n factory: factory\n };\n };\n\n define.remove = function (id) {\n delete modules[id];\n };\n\n define.moduleMap = modules;\n})();\n\n//Export for use in node\nif (typeof module === \"object\" && typeof require === \"function\") {\n module.exports.require = require;\n module.exports.define = define;\n}\n\n//@ sourceURL=lib/scripts/require.js")} catch(e) {console.log("exception: in lib/scripts/require.js: " + e);console.log(e.stack);} -try {eval("define(\"cordova\", function(require, exports, module) {\n\n\nvar channel = require('cordova/channel');\n\n/**\n * Listen for DOMContentLoaded and notify our channel subscribers.\n */\ndocument.addEventListener('DOMContentLoaded', function() {\n channel.onDOMContentLoaded.fire();\n}, false);\nif (document.readyState == 'complete' || document.readyState == 'interactive') {\n channel.onDOMContentLoaded.fire();\n}\n\n/**\n * Intercept calls to addEventListener + removeEventListener and handle deviceready,\n * resume, and pause events.\n */\nvar m_document_addEventListener = document.addEventListener;\nvar m_document_removeEventListener = document.removeEventListener;\nvar m_window_addEventListener = window.addEventListener;\nvar m_window_removeEventListener = window.removeEventListener;\n\n/**\n * Houses custom event handlers to intercept on document + window event listeners.\n */\nvar documentEventHandlers = {},\n windowEventHandlers = {};\n\ndocument.addEventListe ner = function(evt, handler, capture) {\n var e = evt.toLowerCase();\n if (typeof documentEventHandlers[e] != 'undefined') {\n documentEventHandlers[e].subscribe(handler);\n } else {\n m_document_addEventListener.call(document, evt, handler, capture);\n }\n};\n\nwindow.addEventListener = function(evt, handler, capture) {\n var e = evt.toLowerCase();\n if (typeof windowEventHandlers[e] != 'undefined') {\n windowEventHandlers[e].subscribe(handler);\n } else {\n m_window_addEventListener.call(window, evt, handler, capture);\n }\n};\n\ndocument.removeEventListener = function(evt, handler, capture) {\n var e = evt.toLowerCase();\n // If unsubscribing from an event that is handled by a plugin\n if (typeof documentEventHandlers[e] != \"undefined\") {\n documentEventHandlers[e].unsubscribe(handler);\n } else {\n m_document_removeEventListener.call(document, evt, handler, capture);\n }\n};\n\nwindow.removeEventL istener = function(evt, handler, capture) {\n var e = evt.toLowerCase();\n // If unsubscribing from an event that is handled by a plugin\n if (typeof windowEventHandlers[e] != \"undefined\") {\n windowEventHandlers[e].unsubscribe(handler);\n } else {\n m_window_removeEventListener.call(window, evt, handler, capture);\n }\n};\n\nfunction createEvent(type, data) {\n var event = document.createEvent('Events');\n event.initEvent(type, false, false);\n if (data) {\n for (var i in data) {\n if (data.hasOwnProperty(i)) {\n event[i] = data[i];\n }\n }\n }\n return event;\n}\n\nif(typeof window.console === \"undefined\") {\n window.console = {\n log:function(){}\n };\n}\n\nvar cordova = {\n define:define,\n require:require,\n /**\n * Methods to add/remove your own addEventListener hijacking on document + window.\n */\n addWindowEventHandler:function(event) {\n return (windowEventHandlers[event] = channel.create(event));\n },\n addStickyDocumentEventHandler:function(event) {\n return (documentEventHandlers[event] = channel.createSticky(event));\n },\n addDocumentEventHandler:function(event) {\n return (documentEventHandlers[event] = channel.create(event));\n },\n removeWindowEventHandler:function(event) {\n delete windowEventHandlers[event];\n },\n removeDocumentEventHandler:function(event) {\n delete documentEventHandlers[event];\n },\n /**\n * Retrieve original event handlers that were replaced by Cordova\n *\n * @return object\n */\n getOriginalHandlers: function() {\n return {'document': {'addEventListener': m_document_addEventListener, 'removeEventListener': m_document_removeEventListener},\n 'window': {'addEventListener': m_window_addEventListener, 'removeEventListener': m_window_removeEventListener}};\n },\n /**\n * Method to fire event from native code\n * bNoDetach is required for events which cause an exception which needs to be caught in native code\n */\n fireDocumentEvent: function(type, data, bNoDetach) {\n var evt = createEvent(type, data);\n if (typeof documentEventHandlers[type] != 'undefined') {\n if( bNoDetach ) {\n documentEventHandlers[type].fire(evt);\n }\n else {\n setTimeout(function() {\n documentEventHandlers[type].fire(evt);\n }, 0);\n }\n } else {\n document.dispatchEvent(evt);\n }\n },\n fireWindowEvent: function(type, data) {\n var evt = createEvent(type,data);\n if (typeof windowEventHandlers[type] != 'undefined') {\n setTimeout(function() {\n windowEventHandlers[type].fire(evt);\n }, 0);\n } else {\n window.dispatchEvent(evt);\n }\n },\n\n /**\n * Plugin callback mechanism.\n */\n // Randomize the starting callbackId to avoid collisions after refreshing or navigating.\n // This way, it's very unlikely that any new callback would get the same callbackId as an old callback.\n callbackId: Math.floor(Math.random() * 2000000000),\n callbacks: {},\n callbackStatus: {\n NO_RESULT: 0,\n OK: 1,\n CLASS_NOT_FOUND_EXCEPTION: 2,\n ILLEGAL_ACCESS_EXCEPTION: 3,\n INSTANTIATION_EXCEPTION: 4,\n MALFORMED_URL_EXCEPTION: 5,\n IO_EXCEPTION: 6,\n INVALID_ACTION: 7,\n JSON_EXCEPTION: 8,\n ERROR: 9\n },\n\n /**\n * Called by native code when returning successful result from an action.\n */\n callbackSuccess: function(callbackId, args) {\n try {\n cordova.callbackFromNative(callbackId, true, args.status, args.message, args.keepCallback);\n } catch (e) {\n console.log(\"Error in error callback: \" + callback Id + \" = \"+e);\n }\n },\n\n /**\n * Called by native code when returning error result from an action.\n */\n callbackError: function(callbackId, args) {\n // TODO: Deprecate callbackSuccess and callbackError in favour of callbackFromNative.\n // Derive success from status.\n try {\n cordova.callbackFromNative(callbackId, false, args.status, args.message, args.keepCallback);\n } catch (e) {\n console.log(\"Error in error callback: \" + callbackId + \" = \"+e);\n }\n },\n\n /**\n * Called by native code when returning the result from an action.\n */\n callbackFromNative: function(callbackId, success, status, message, keepCallback) {\n var callback = cordova.callbacks[callbackId];\n if (callback) {\n if (success && status == cordova.callbackStatus.OK) {\n callback.success && callback.success(message);\n } else if (!success) {\n callback.fail && callback.fail(message);\n }\n\n // Clear callback if not expecting any more results\n if (!keepCallback) {\n delete cordova.callbacks[callbackId];\n }\n }\n },\n addConstructor: function(func) {\n channel.onCordovaReady.subscribe(function() {\n try {\n func();\n } catch(e) {\n console.log(\"Failed to run constructor: \" + e);\n }\n });\n }\n};\n\n// Register pause, resume and deviceready channels as events on document.\nchannel.onPause = cordova.addDocumentEventHandler('pause');\nchannel.onResume = cordova.addDocumentEventHandler('resume');\nchannel.onDeviceReady = cordova.addStickyDocumentEventHandler('deviceready');\n\nmodule.exports = cordova;\n\n});\n\n//@ sourceURL=lib/cordova.js")} catch(e) {console.log("exception: in lib/cordova.js: " + e);console.log(e.stack);} +try {eval("define(\"cordova\", function(require, exports, module) {\n\n\nvar channel = require('cordova/channel');\n\n/**\n * Listen for DOMContentLoaded and notify our channel subscribers.\n */\ndocument.addEventListener('DOMContentLoaded', function() {\n channel.onDOMContentLoaded.fire();\n}, false);\nif (document.readyState == 'complete' || document.readyState == 'interactive') {\n channel.onDOMContentLoaded.fire();\n}\n\n/**\n * Intercept calls to addEventListener + removeEventListener and handle deviceready,\n * resume, and pause events.\n */\nvar m_document_addEventListener = document.addEventListener;\nvar m_document_removeEventListener = document.removeEventListener;\nvar m_window_addEventListener = window.addEventListener;\nvar m_window_removeEventListener = window.removeEventListener;\n\n/**\n * Houses custom event handlers to intercept on document + window event listeners.\n */\nvar documentEventHandlers = {},\n windowEventHandlers = {};\n\ndocument.addEventListe ner = function(evt, handler, capture) {\n var e = evt.toLowerCase();\n if (typeof documentEventHandlers[e] != 'undefined') {\n documentEventHandlers[e].subscribe(handler);\n } else {\n m_document_addEventListener.call(document, evt, handler, capture);\n }\n};\n\nwindow.addEventListener = function(evt, handler, capture) {\n var e = evt.toLowerCase();\n if (typeof windowEventHandlers[e] != 'undefined') {\n windowEventHandlers[e].subscribe(handler);\n } else {\n m_window_addEventListener.call(window, evt, handler, capture);\n }\n};\n\ndocument.removeEventListener = function(evt, handler, capture) {\n var e = evt.toLowerCase();\n // If unsubscribing from an event that is handled by a plugin\n if (typeof documentEventHandlers[e] != \"undefined\") {\n documentEventHandlers[e].unsubscribe(handler);\n } else {\n m_document_removeEventListener.call(document, evt, handler, capture);\n }\n};\n\nwindow.removeEventL istener = function(evt, handler, capture) {\n var e = evt.toLowerCase();\n // If unsubscribing from an event that is handled by a plugin\n if (typeof windowEventHandlers[e] != \"undefined\") {\n windowEventHandlers[e].unsubscribe(handler);\n } else {\n m_window_removeEventListener.call(window, evt, handler, capture);\n }\n};\n\nfunction createEvent(type, data) {\n var event = document.createEvent('Events');\n event.initEvent(type, false, false);\n if (data) {\n for (var i in data) {\n if (data.hasOwnProperty(i)) {\n event[i] = data[i];\n }\n }\n }\n return event;\n}\n\nif(typeof window.console === \"undefined\") {\n window.console = {\n log:function(){}\n };\n}\n\nvar cordova = {\n define:define,\n require:require,\n /**\n * Methods to add/remove your own addEventListener hijacking on document + window.\n */\n addWindowEventHandler:function(event) {\n return (windowEventHandlers[event] = channel.create(event));\n },\n addStickyDocumentEventHandler:function(event) {\n return (documentEventHandlers[event] = channel.createSticky(event));\n },\n addDocumentEventHandler:function(event) {\n return (documentEventHandlers[event] = channel.create(event));\n },\n removeWindowEventHandler:function(event) {\n delete windowEventHandlers[event];\n },\n removeDocumentEventHandler:function(event) {\n delete documentEventHandlers[event];\n },\n /**\n * Retrieve original event handlers that were replaced by Cordova\n *\n * @return object\n */\n getOriginalHandlers: function() {\n return {'document': {'addEventListener': m_document_addEventListener, 'removeEventListener': m_document_removeEventListener},\n 'window': {'addEventListener': m_window_addEventListener, 'removeEventListener': m_window_removeEventListener}};\n },\n /**\n * Method to fire event from native code\n * bNoDetach is required for events which cause an exception which needs to be caught in native code\n */\n fireDocumentEvent: function(type, data, bNoDetach) {\n var evt = createEvent(type, data);\n if (typeof documentEventHandlers[type] != 'undefined') {\n if( bNoDetach ) {\n documentEventHandlers[type].fire(evt);\n }\n else {\n setTimeout(function() {\n documentEventHandlers[type].fire(evt);\n }, 0);\n }\n } else {\n document.dispatchEvent(evt);\n }\n },\n fireWindowEvent: function(type, data) {\n var evt = createEvent(type,data);\n if (typeof windowEventHandlers[type] != 'undefined') {\n setTimeout(function() {\n windowEventHandlers[type].fire(evt);\n }, 0);\n } else {\n window.dispatchEvent(evt);\n }\n },\n\n /**\n * Plugin callback mechanism.\n */\n // Randomize the starting callbackId to avoid collisions after refreshing or navigating.\n // This way, it's very unlikely that any new callback would get the same callbackId as an old callback.\n callbackId: Math.floor(Math.random() * 2000000000),\n callbacks: {},\n callbackStatus: {\n NO_RESULT: 0,\n OK: 1,\n CLASS_NOT_FOUND_EXCEPTION: 2,\n ILLEGAL_ACCESS_EXCEPTION: 3,\n INSTANTIATION_EXCEPTION: 4,\n MALFORMED_URL_EXCEPTION: 5,\n IO_EXCEPTION: 6,\n INVALID_ACTION: 7,\n JSON_EXCEPTION: 8,\n ERROR: 9\n },\n\n /**\n * Called by native code when returning successful result from an action.\n */\n callbackSuccess: function(callbackId, args) {\n try {\n cordova.callbackFromNative(callbackId, true, args.status, [args.message], args.keepCallback);\n } catch (e) {\n console.log(\"Error in error callback: \" + callba ckId + \" = \"+e);\n }\n },\n\n /**\n * Called by native code when returning error result from an action.\n */\n callbackError: function(callbackId, args) {\n // TODO: Deprecate callbackSuccess and callbackError in favour of callbackFromNative.\n // Derive success from status.\n try {\n cordova.callbackFromNative(callbackId, false, args.status, [args.message], args.keepCallback);\n } catch (e) {\n console.log(\"Error in error callback: \" + callbackId + \" = \"+e);\n }\n },\n\n /**\n * Called by native code when returning the result from an action.\n */\n callbackFromNative: function(callbackId, success, status, args, keepCallback) {\n var callback = cordova.callbacks[callbackId];\n if (callback) {\n if (success && status == cordova.callbackStatus.OK) {\n callback.success && callback.success.apply(null, args);\n } else if (!success) {\n callback.fail && callback.fail.apply(null, args);\n }\n\n // Clear callback if not expecting any more results\n if (!keepCallback) {\n delete cordova.callbacks[callbackId];\n }\n }\n },\n addConstructor: function(func) {\n channel.onCordovaReady.subscribe(function() {\n try {\n func();\n } catch(e) {\n console.log(\"Failed to run constructor: \" + e);\n }\n });\n }\n};\n\n// Register pause, resume and deviceready channels as events on document.\nchannel.onPause = cordova.addDocumentEventHandler('pause');\nchannel.onResume = cordova.addDocumentEventHandler('resume');\nchannel.onDeviceReady = cordova.addStickyDocumentEventHandler('deviceready');\n\nmodule.exports = cordova;\n\n});\n\n//@ sourceURL=lib/cordova.js")} catch(e) {console.log("exception: in lib/cordova.js: " + e);console.log(e.stack);} try {eval("define(\"cordova/argscheck\", function(require, exports, module) {\n\nvar exec = require('cordova/exec');\nvar utils = require('cordova/utils');\n\nvar moduleExports = module.exports;\n\nvar typeMap = {\n 'A': 'Array',\n 'D': 'Date',\n 'N': 'Number',\n 'S': 'String',\n 'F': 'Function',\n 'O': 'Object'\n};\n\nfunction extractParamName(callee, argIndex) {\n return (/.*?\\((.*?)\\)/).exec(callee)[1].split(', ')[argIndex];\n}\n\nfunction checkArgs(spec, functionName, args, opt_callee) {\n if (!moduleExports.enableChecks) {\n return;\n }\n var errMsg = null;\n var typeName;\n for (var i = 0; i < spec.length; ++i) {\n var c = spec.charAt(i),\n cUpper = c.toUpperCase(),\n arg = args[i];\n // Asterix means allow anything.\n if (c == '*') {\n continue;\n }\n typeName = utils.typeName(arg);\n if ((arg === null || arg === undefined) && c == cUpper) {\n conti nue;\n }\n if (typeName != typeMap[cUpper]) {\n errMsg = 'Expected ' + typeMap[cUpper];\n break;\n }\n }\n if (errMsg) {\n errMsg += ', but got ' + typeName + '.';\n errMsg = 'Wrong type for parameter \"' + extractParamName(opt_callee || args.callee, i) + '\" of ' + functionName + ': ' + errMsg;\n // Don't log when running jake test.\n if (typeof jasmine == 'undefined') {\n console.error(errMsg);\n }\n throw TypeError(errMsg);\n }\n}\n\nfunction getValue(value, defaultValue) {\n return value === undefined ? defaultValue : value;\n}\n\nmoduleExports.checkArgs = checkArgs;\nmoduleExports.getValue = getValue;\nmoduleExports.enableChecks = true;\n\n\n});\n\n//@ sourceURL=lib/common/argscheck.js")} catch(e) {console.log("exception: in lib/common/argscheck.js: " + e);console.log(e.stack);} -try {eval("define(\"cordova/builder\", function(require, exports, module) {\n\nvar utils = require('cordova/utils');\n\nfunction each(objects, func, context) {\n for (var prop in objects) {\n if (objects.hasOwnProperty(prop)) {\n func.apply(context, [objects[prop], prop]);\n }\n }\n}\n\nfunction clobber(obj, key, value) {\n obj[key] = value;\n // Getters can only be overridden by getters.\n if (obj[key] !== value) {\n utils.defineGetter(obj, key, function() {\n return value;\n });\n }\n}\n\nfunction assignOrWrapInDeprecateGetter(obj, key, value, message) {\n if (message) {\n utils.defineGetter(obj, key, function() {\n console.log(message);\n delete obj[key];\n clobber(obj, key, value);\n return value;\n });\n } else {\n clobber(obj, key, value);\n }\n}\n\nfunction include(parent, objects, clobber, merge) {\n each(objects, function (obj, key ) {\n try {\n var result = obj.path ? require(obj.path) : {};\n\n if (clobber) {\n // Clobber if it doesn't exist.\n if (typeof parent[key] === 'undefined') {\n assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated);\n } else if (typeof obj.path !== 'undefined') {\n // If merging, merge properties onto parent, otherwise, clobber.\n if (merge) {\n recursiveMerge(parent[key], result);\n } else {\n assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated);\n }\n }\n result = parent[key];\n } else {\n // Overwrite if not currently defined.\n if (typeof parent[key] == 'undefined') {\n assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated);\n } else {\n // Set result to what a lready exists, so we can build children into it if they exist.\n result = parent[key];\n }\n }\n\n if (obj.children) {\n include(result, obj.children, clobber, merge);\n }\n } catch(e) {\n utils.alert('Exception building cordova JS globals: ' + e + ' for key \"' + key + '\"');\n }\n });\n}\n\n/**\n * Merge properties from one object onto another recursively. Properties from\n * the src object will overwrite existing target property.\n *\n * @param target Object to merge properties into.\n * @param src Object to merge properties from.\n */\nfunction recursiveMerge(target, src) {\n for (var prop in src) {\n if (src.hasOwnProperty(prop)) {\n if (target.prototype && target.prototype.constructor === target) {\n // If the target object is a constructor override off prototype.\n clobber(target.prototype, prop, src[prop]);\n } else {\n if (typeof src[prop] === 'object' && typeof target[prop] === 'object') {\n recursiveMerge(target[prop], src[prop]);\n } else {\n clobber(target, prop, src[prop]);\n }\n }\n }\n }\n}\n\nmodule.exports = {\n buildIntoButDoNotClobber: function(objects, target) {\n include(target, objects, false, false);\n },\n buildIntoAndClobber: function(objects, target) {\n include(target, objects, true, false);\n },\n buildIntoAndMerge: function(objects, target) {\n include(target, objects, true, true);\n },\n recursiveMerge: recursiveMerge,\n assignOrWrapInDeprecateGetter: assignOrWrapInDeprecateGetter\n};\n\n});\n\n//@ sourceURL=lib/common/builder.js")} catch(e) {console.log("exception: in lib/common/builder.js: " + e);console.log(e.stack);} -try {eval("define(\"cordova/channel\", function(require, exports, module) {\n\nvar utils = require('cordova/utils'),\n nextGuid = 1;\n\n/**\n * Custom pub-sub \"channel\" that can have functions subscribed to it\n * This object is used to define and control firing of events for\n * cordova initialization, as well as for custom events thereafter.\n *\n * The order of events during page load and Cordova startup is as follows:\n *\n * onDOMContentLoaded* Internal event that is received when the web page is loaded and parsed.\n * onNativeReady* Internal event that indicates the Cordova native side is ready.\n * onCordovaReady* Internal event fired when all Cordova JavaScript objects have been created.\n * onCordovaInfoReady* Internal event fired when device properties are available.\n * onCordovaConnectionReady* Internal event fired when the connection property has been set.\n * onDeviceReady* User event fired to indicate that C ordova is ready\n * onResume User event fired to indicate a start/resume lifecycle event\n * onPause User event fired to indicate a pause lifecycle event\n * onDestroy* Internal event fired when app is being destroyed (User should use window.onunload event, not this one).\n *\n * The events marked with an * are sticky. Once they have fired, they will stay in the fired state.\n * All listeners that subscribe after the event is fired will be executed right away.\n *\n * The only Cordova events that user code should register for are:\n * deviceready Cordova native code is initialized and Cordova APIs can be called from JavaScript\n * pause App has moved to background\n * resume App has returned to foreground\n *\n * Listeners can be registered as:\n * document.addEventListener(\"deviceready\", myDeviceReadyListener, false);\n * document.addEventListener(\"resume\", myResumeListener, false);\n * document.addEventListener(\"pause\", myPauseListener, false);\n *\n * The DOM lifecycle events should be used for saving and restoring state\n * window.onload\n * window.onunload\n *\n */\n\n/**\n * Channel\n * @constructor\n * @param type String the channel name\n */\nvar Channel = function(type, sticky) {\n this.type = type;\n // Map of guid -> function.\n this.handlers = {};\n // 0 = Non-sticky, 1 = Sticky non-fired, 2 = Sticky fired.\n this.state = sticky ? 1 : 0;\n // Used in sticky mode to remember args passed to fire().\n this.fireArgs = null;\n // Used by onHasSubscribersChange to know if there are any listeners.\n this.numHandlers = 0;\n // Function that is called when the first listener is subscribed, or when\n // the last listener is unsubscribed.\n this.onHasSubscribersChange = null;\n},\n channel = {\n /**\n * Calls the provided function only after all of the channels spe cified\n * have been fired. All channels must be sticky channels.\n */\n join: function(h, c) {\n var len = c.length,\n i = len,\n f = function() {\n if (!(--i)) h();\n };\n for (var j=0; j function.\n this.handlers = {};\n // 0 = Non-sticky, 1 = Sticky non-fired, 2 = Sticky fired.\n this.state = sticky ? 1 : 0;\n // Used in sticky mode to remember args passed to fire().\n this.fireArgs = null;\n // Used by onHasSubscribersChange to know if there are any listeners.\n this.numHandlers = 0;\n // Function that is called when the first listener is subscribed, or when\n // the last listener is unsubscribed.\n this.onHasSubscribersChange = null;\n},\n channel = {\n /**\n * Calls the provided function only after all of the channels spe cified\n * have been fired. All channels must be sticky channels.\n */\n join: function(h, c) {\n var len = c.length,\n i = len,\n f = function() {\n if (!(--i)) h();\n };\n for (var j=0; j} phoneNumbers array of phone numbers\n* @param {Array.} emails array of email addresses\n* @param {Array.} addresses array of addresses\n* @param {Array.} ims instant messaging user ids\n* @param {Array.} organizations\n* @param {DOMString} birthday contact's birthday\n* @param {DOMString} note user notes about contact\n* @param {Array.} photos\n* @param {Array.} categories\n* @param {Array.} urls contact's web sites\n*/\nvar Contact = function (id, displayName, name, nickname, phoneNumbers, emails, addresses,\n ims, organizations, birthday, note, photos, categories, urls) {\n this.id = id || null;\n this.rawId = null;\n this.displayName = displayName || null;\n this.name = name || null; // ContactName\n this.nickname = nickname || null;\n this.phoneNumbers = phoneNumbers || null; // ContactField[]\n this.emails = emails || null; // ContactField[]\n this.addresses = addresses || null; // ContactAddress[]\n this.ims = ims || null; // ContactField[]\n this.organizations = organizations || null; // ContactOrganization[]\n this.birthday = birthday || null;\n this.note = note || null;\n this.photos = photos || null; // ContactField[]\n this.categories = categories || null; // ContactField[]\n this.urls = urls || null; // ContactField[]\n};\n\n/**\n* Removes contact from device storage.\n* @param successCB success callback\n* @param errorCB error callback\n*/\nContact.prototype.remove = function(successCB, errorCB) {\n argscheck.checkArgs('FF', 'Contact.remove', arguments);\n var fail = errorCB && function(code) {\n errorCB(new ContactError(code));\n };\n if (this.id === null) {\n fail(ContactError.UNKNOWN_ERROR);\n }\n else {\n exec(successCB, fail, \"Contacts\", \"remove\", [this.id]);\n }\n};\n\n/**\n* Creates a deep copy of this Contact.\n* With the contact ID set to null.\n* @return copy of this Contact\n*/\nContact.prototype.clone = function() {\n var clonedContact = utils.clone(this);\n clonedContact.id = null;\n clonedContact.rawId = null;\n\n function nullIds(arr) {\n if (arr) {\n for (var i = 0; i < arr.length; ++i) {\n arr[i].id = null;\n }\n }\n }\n\n // Loop through and clear out any id's in phones, emails, etc.\n nullIds(clonedContact.phoneNumbers);\n nullIds(clonedContact.e mails);\n nullIds(clonedContact.addresses);\n nullIds(clonedContact.ims);\n nullIds(clonedContact.organizations);\n nullIds(clonedContact.categories);\n nullIds(clonedContact.photos);\n nullIds(clonedContact.urls);\n return clonedContact;\n};\n\n/**\n* Persists contact to device storage.\n* @param successCB success callback\n* @param errorCB error callback\n*/\nContact.prototype.save = function(successCB, errorCB) {\n argscheck.checkArgs('FFO', 'Contact.save', arguments);\n var fail = errorCB && function(code) {\n errorCB(new ContactError(code));\n };\n var success = function(result) {\n if (result) {\n if (successCB) {\n var fullContact = require('cordova/plugin/contacts').create(result);\n successCB(convertIn(fullContact));\n }\n }\n else {\n // no Entry object returned\n fail(ContactError.UNKNOWN_ERROR);\n }\n };\n var dupContact = co nvertOut(utils.clone(this));\n exec(success, fail, \"Contacts\", \"save\", [dupContact]);\n};\n\n\nmodule.exports = Contact;\n\n});\n\n//@ sourceURL=lib/common/plugin/Contact.js")} catch(e) {console.log("exception: in lib/common/plugin/Contact.js: " + e);console.log(e.stack);} @@ -63,14 +63,14 @@ try {eval("define(\"cordova/plugin/FileEntry\", function(require, exports, modul try {eval("define(\"cordova/plugin/FileError\", function(require, exports, module) {\n\n/**\n * FileError\n */\nfunction FileError(error) {\n this.code = error || null;\n}\n\n// File error codes\n// Found in DOMException\nFileError.NOT_FOUND_ERR = 1;\nFileError.SECURITY_ERR = 2;\nFileError.ABORT_ERR = 3;\n\n// Added by File API specification\nFileError.NOT_READABLE_ERR = 4;\nFileError.ENCODING_ERR = 5;\nFileError.NO_MODIFICATION_ALLOWED_ERR = 6;\nFileError.INVALID_STATE_ERR = 7;\nFileError.SYNTAX_ERR = 8;\nFileError.INVALID_MODIFICATION_ERR = 9;\nFileError.QUOTA_EXCEEDED_ERR = 10;\nFileError.TYPE_MISMATCH_ERR = 11;\nFileError.PATH_EXISTS_ERR = 12;\n\nmodule.exports = FileError;\n\n});\n\n//@ sourceURL=lib/common/plugin/FileError.js")} catch(e) {console.log("exception: in lib/common/