From 83834aff18eb13d9e67a487542515daf11de65e1 Mon Sep 17 00:00:00 2001 From: Kevin Schaaf Date: Tue, 28 Aug 2018 14:48:13 -0400 Subject: [PATCH 1/3] Upstream changes to externs --- externs/polymer-externs.js | 17 ++++++++++++++++- externs/webcomponents-externs.js | 16 ++++++++-------- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/externs/polymer-externs.js b/externs/polymer-externs.js index 7c0ede16aa..45d21181d0 100644 --- a/externs/polymer-externs.js +++ b/externs/polymer-externs.js @@ -78,6 +78,21 @@ function Polymer(init){} */ Polymer.sanitizeDOMValue; +/** + * @type {boolean} + */ +Polymer.passiveTouchGestures; + +/** + * @type {boolean} + */ +Polymer.strictTemplatePolicy; + +/** + * @type {boolean} + */ +Polymer.allowTemplateFromDomModule; + /** * @param {string} string * @param {Object} obj @@ -172,7 +187,7 @@ var PolymerDeepPropertyChange; * @constructor * @template T */ -let DomRepeatEvent = function() {}; +var DomRepeatEvent = function() {}; /** * @type {{ diff --git a/externs/webcomponents-externs.js b/externs/webcomponents-externs.js index 8bcf4cede5..029cf4fea4 100644 --- a/externs/webcomponents-externs.js +++ b/externs/webcomponents-externs.js @@ -12,37 +12,37 @@ */ /* eslint-disable */ -let HTMLImports = { +var HTMLImports = { /** * @param {function()} callback */ - whenReady(callback){}, + whenReady(callback) {}, /** * @param {Element} element * @returns {Document} document */ - importForElement(element){} + importForElement(element) {} }; window.HTMLImports = HTMLImports; -let ShadyDOM = { +var ShadyDOM = { inUse: false, - flush(){}, + flush() {}, /** * @param {!Node} target * @param {function(Array, MutationObserver)} callback * @return {MutationObserver} */ - observeChildren(target, callback){}, + observeChildren(target, callback) {}, /** * @param {MutationObserver} observer */ - unobserveChildren(observer){}, + unobserveChildren(observer) {}, /** * @param {Node} node */ - patch(node){} + patch(node) {} }; window.ShadyDOM = ShadyDOM; From b4d6e70a1168d81781a455d19b748cfd73d22246 Mon Sep 17 00:00:00 2001 From: Kevin Schaaf Date: Tue, 28 Aug 2018 17:53:27 -0400 Subject: [PATCH 2/3] Upstream warning text. --- lib/legacy/legacy-data-mixin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/legacy/legacy-data-mixin.js b/lib/legacy/legacy-data-mixin.js index 5aee1e0209..2d18397d6a 100644 --- a/lib/legacy/legacy-data-mixin.js +++ b/lib/legacy/legacy-data-mixin.js @@ -40,7 +40,7 @@ function wrapEffect(effect, fnName) { fn.apply(this, arguments); } catch (e) { if (e instanceof UndefinedArgumentError) { - console.warn(`Argument '${e.arg}'${fnName ?` for method '${fnName}'` : ''} was undefined. Ensure it has an undefined check.`); + console.warn(`Argument '${e.arg}'${fnName ?` for method '${fnName}'` : ''} was undefined. Ensure it has a default value, or else ensure the method handles the argument being undefined.`); } else { throw e; } @@ -98,7 +98,7 @@ export const LegacyDataMixin = dedupingMixin(superClass => { // Break out of effect's control flow; will be caught in // wrapped property effect function below const name = args[i].name; - throw new UndefinedArgumentError(`Argument '${name}' is undefined. Ensure it has an undefined check.`, name); + throw new UndefinedArgumentError(`Argument '${name}' is undefined.`, name); } } } From e69c8b3c6e2bc58800f35a83089da806a6d8aa7c Mon Sep 17 00:00:00 2001 From: Kevin Schaaf Date: Tue, 28 Aug 2018 20:23:59 -0400 Subject: [PATCH 3/3] Fix jsdoc comment --- lib/legacy/legacy-data-mixin.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/legacy/legacy-data-mixin.js b/lib/legacy/legacy-data-mixin.js index 2d18397d6a..3c61115f25 100644 --- a/lib/legacy/legacy-data-mixin.js +++ b/lib/legacy/legacy-data-mixin.js @@ -75,7 +75,8 @@ export const LegacyDataMixin = dedupingMixin(superClass => { * @constructor * @extends {superClass} * @unrestricted - * @private */ + * @private + */ class LegacyDataMixin extends superClass { /** * Overrides `Polymer.PropertyEffects` to add `undefined` argument