You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by er...@apache.org on 2019/09/11 08:18:00 UTC

[cordova-android] 02/02: Update JS snapshot to version 8.2.0-dev (via coho)

This is an automated email from the ASF dual-hosted git repository.

erisu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-android.git

commit c35a990c09f1ab278873754eb7f81e52250893a3
Author: Erisu <el...@gmail.com>
AuthorDate: Wed Sep 11 13:58:08 2019 +0900

    Update JS snapshot to version 8.2.0-dev (via coho)
---
 bin/templates/project/assets/www/cordova.js | 59 +++++++++++++++++++++--------
 1 file changed, 43 insertions(+), 16 deletions(-)

diff --git a/bin/templates/project/assets/www/cordova.js b/bin/templates/project/assets/www/cordova.js
index 261ba02..6395c90 100644
--- a/bin/templates/project/assets/www/cordova.js
+++ b/bin/templates/project/assets/www/cordova.js
@@ -1,5 +1,5 @@
 // Platform: android
-// 882658ab17740dbdece764e68c1f1f1f44fe3f9d
+// 74fdba8b327b2a13b4366dd141b52def96d4cb56
 /*
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements.  See the NOTICE file
@@ -8,9 +8,9 @@
  to you under the Apache License, Version 2.0 (the
  "License"); you may not use this file except in compliance
  with the License.  You may obtain a copy of the License at
- 
+
      http://www.apache.org/licenses/LICENSE-2.0
- 
+
  Unless required by applicable law or agreed to in writing,
  software distributed under the License is distributed on an
  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -19,9 +19,8 @@
  under the License.
 */
 ;(function() {
-var PLATFORM_VERSION_BUILD_LABEL = '8.1.0-dev';
+var PLATFORM_VERSION_BUILD_LABEL = '8.2.0-dev';
 // file: src/scripts/require.js
-
 var require;
 var define;
 
@@ -70,7 +69,7 @@ var define;
     };
 
     define = function (id, factory) {
-        if (modules[id]) {
+        if (Object.prototype.hasOwnProperty.call(modules, id)) {
             throw 'module ' + id + ' already defined';
         }
 
@@ -205,8 +204,8 @@ var cordova = {
      * @return object
      */
     getOriginalHandlers: function () {
-        return {'document': {'addEventListener': m_document_addEventListener, 'removeEventListener': m_document_removeEventListener},
-            'window': {'addEventListener': m_window_addEventListener, 'removeEventListener': m_window_removeEventListener}};
+        return { 'document': { 'addEventListener': m_document_addEventListener, 'removeEventListener': m_document_removeEventListener },
+            'window': { 'addEventListener': m_window_addEventListener, 'removeEventListener': m_window_removeEventListener } };
     },
     /**
      * Method to fire event from native code
@@ -324,7 +323,7 @@ module.exports = cordova;
 
 });
 
-// file: /Users/erisu/git/apache/cordova/cordova-android/cordova-js-src/android/nativeapiprovider.js
+// file: ../cordova-android/cordova-js-src/android/nativeapiprovider.js
 define("cordova/android/nativeapiprovider", function(require, exports, module) {
 
 /**
@@ -347,7 +346,7 @@ module.exports = {
 
 });
 
-// file: /Users/erisu/git/apache/cordova/cordova-android/cordova-js-src/android/promptbasednativeapi.js
+// file: ../cordova-android/cordova-js-src/android/promptbasednativeapi.js
 define("cordova/android/promptbasednativeapi", function(require, exports, module) {
 
 /**
@@ -386,9 +385,38 @@ var typeMap = {
 };
 
 function extractParamName (callee, argIndex) {
-    return (/.*?\((.*?)\)/).exec(callee)[1].split(', ')[argIndex];
+    return (/\(\s*([^)]*?)\s*\)/).exec(callee)[1].split(/\s*,\s*/)[argIndex];
 }
 
+/**
+ * Checks the given arguments' types and throws if they are not as expected.
+ *
+ * `spec` is a string where each character stands for the required type of the
+ * argument at the same position. In other words: the character at `spec[i]`
+ * specifies the required type for `args[i]`. The characters in `spec` are the
+ * first letter of the required type's name. The supported types are:
+ *
+ *     Array, Date, Number, String, Function, Object
+ *
+ * Lowercase characters specify arguments that must not be `null` or `undefined`
+ * while uppercase characters allow those values to be passed.
+ *
+ * Finally, `*` can be used to allow any type at the corresponding position.
+ *
+ * @example
+ * function foo (arr, opts) {
+ *     // require `arr` to be an Array and `opts` an Object, null or undefined
+ *     checkArgs('aO', 'my.package.foo', arguments);
+ *     // ...
+ * }
+ * @param {String} spec - the type specification for `args` as described above
+ * @param {String} functionName - full name of the callee.
+ * Used in the error message
+ * @param {Array|arguments} args - the arguments to be checked against `spec`
+ * @param {Function} [opt_callee=args.callee] - the recipient of `args`.
+ * Used to extract parameter names for the error message
+ * @throws {TypeError} if args do not satisfy spec
+ */
 function checkArgs (spec, functionName, args, opt_callee) {
     if (!moduleExports.enableChecks) {
         return;
@@ -879,7 +907,7 @@ module.exports = channel;
 
 });
 
-// file: /Users/erisu/git/apache/cordova/cordova-android/cordova-js-src/exec.js
+// file: ../cordova-android/cordova-js-src/exec.js
 define("cordova/exec", function(require, exports, module) {
 
 /**
@@ -1406,7 +1434,7 @@ exports.reset();
 
 });
 
-// file: /Users/erisu/git/apache/cordova/cordova-android/cordova-js-src/platform.js
+// file: ../cordova-android/cordova-js-src/platform.js
 define("cordova/platform", function(require, exports, module) {
 
 // The last resume event that was received that had the result of a plugin call.
@@ -1516,7 +1544,7 @@ function onMessageFromNative(msg) {
 
 });
 
-// file: /Users/erisu/git/apache/cordova/cordova-android/cordova-js-src/plugin/android/app.js
+// file: ../cordova-android/cordova-js-src/plugin/android/app.js
 define("cordova/plugin/android/app", function(require, exports, module) {
 
 var exec = require('cordova/exec');
@@ -1902,7 +1930,6 @@ utils.alert = function (msg) {
 
 window.cordova = require('cordova');
 // file: src/scripts/bootstrap.js
-
 require('cordova/init');
 
-})();
\ No newline at end of file
+})();


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org