From da3f026974d8a97789f0178d8722da67296ee4ff Mon Sep 17 00:00:00 2001 From: Steve Gill Date: Fri, 31 Jul 2015 16:50:01 -0700 Subject: [PATCH] Update JS snapshot to version 4.1.1 (via coho) --- bin/templates/project/assets/www/cordova.js | 69 +++++++++++---------- 1 file changed, 36 insertions(+), 33 deletions(-) diff --git a/bin/templates/project/assets/www/cordova.js b/bin/templates/project/assets/www/cordova.js index 9fddd15a..23f6e475 100644 --- a/bin/templates/project/assets/www/cordova.js +++ b/bin/templates/project/assets/www/cordova.js @@ -1,5 +1,5 @@ // Platform: android -// a83e94b489774dc8e514671e81c6154eda650af1 +// 2c29e187e4206a6a77fba940ef6f77aef5c7eb8c /* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file @@ -19,7 +19,7 @@ under the License. */ ;(function() { -var PLATFORM_VERSION_BUILD_LABEL = '4.1.0'; +var PLATFORM_VERSION_BUILD_LABEL = '4.1.1'; // file: src/scripts/require.js /*jshint -W079 */ @@ -328,7 +328,7 @@ module.exports = cordova; }); -// file: D:/cordova/cordova-android/cordova-js-src/android/nativeapiprovider.js +// file: /Users/steveng/repo/cordova/cordova-android/cordova-js-src/android/nativeapiprovider.js define("cordova/android/nativeapiprovider", function(require, exports, module) { /** @@ -351,7 +351,7 @@ module.exports = { }); -// file: D:/cordova/cordova-android/cordova-js-src/android/promptbasednativeapi.js +// file: /Users/steveng/repo/cordova/cordova-android/cordova-js-src/android/promptbasednativeapi.js define("cordova/android/promptbasednativeapi", function(require, exports, module) { /** @@ -376,7 +376,6 @@ module.exports = { // file: src/common/argscheck.js define("cordova/argscheck", function(require, exports, module) { -var exec = require('cordova/exec'); var utils = require('cordova/utils'); var moduleExports = module.exports; @@ -861,7 +860,7 @@ module.exports = channel; }); -// file: D:/cordova/cordova-android/cordova-js-src/exec.js +// file: /Users/steveng/repo/cordova/cordova-android/cordova-js-src/exec.js define("cordova/exec", function(require, exports, module) { /** @@ -1230,6 +1229,7 @@ if (!window.console.warn) { // Register pause, resume and deviceready channels as events on document. channel.onPause = cordova.addDocumentEventHandler('pause'); channel.onResume = cordova.addDocumentEventHandler('resume'); +channel.onActivated = cordova.addDocumentEventHandler('activated'); channel.onDeviceReady = cordova.addStickyDocumentEventHandler('deviceready'); // Listen for DOMContentLoaded and notify our channel subscribers. @@ -1357,6 +1357,7 @@ if (!window.console.warn) { // Register pause, resume and deviceready channels as events on document. channel.onPause = cordova.addDocumentEventHandler('pause'); channel.onResume = cordova.addDocumentEventHandler('resume'); +channel.onActivated = cordova.addDocumentEventHandler('activated'); channel.onDeviceReady = cordova.addStickyDocumentEventHandler('deviceready'); // Listen for DOMContentLoaded and notify our channel subscribers. @@ -1500,7 +1501,7 @@ exports.reset(); }); -// file: D:/cordova/cordova-android/cordova-js-src/platform.js +// file: /Users/steveng/repo/cordova/cordova-android/cordova-js-src/platform.js define("cordova/platform", function(require, exports, module) { module.exports = { @@ -1576,7 +1577,7 @@ function onMessageFromNative(msg) { }); -// file: D:/cordova/cordova-android/cordova-js-src/plugin/android/app.js +// file: /Users/steveng/repo/cordova/cordova-android/cordova-js-src/plugin/android/app.js define("cordova/plugin/android/app", function(require, exports, module) { var exec = require('cordova/exec'); @@ -1672,6 +1673,10 @@ module.exports = { // file: src/common/pluginloader.js define("cordova/pluginloader", function(require, exports, module) { +/* + NOTE: this file is NOT used when we use the browserify workflow +*/ + var modulemapper = require('cordova/modulemapper'); var urlutil = require('cordova/urlutil'); @@ -1860,15 +1865,14 @@ utils.typeName = function(val) { /** * Returns an indication of whether the argument is an array or not */ -utils.isArray = function(a) { - return utils.typeName(a) == 'Array'; -}; +utils.isArray = Array.isArray || + function(a) {return utils.typeName(a) == 'Array';}; /** * Returns an indication of whether the argument is a Date or not */ utils.isDate = function(d) { - return utils.typeName(d) == 'Date'; + return (d instanceof Date); }; /** @@ -1902,17 +1906,25 @@ utils.clone = function(obj) { * Returns a wrapped version of the function */ utils.close = function(context, func, params) { - if (typeof params == 'undefined') { - return function() { - return func.apply(context, arguments); - }; - } else { - return function() { - return func.apply(context, params); - }; - } + return function() { + var args = params || arguments; + return func.apply(context, args); + }; }; +//------------------------------------------------------------------------------ +function UUIDcreatePart(length) { + var uuidpart = ""; + for (var i=0; i