From e35a1a7cfc7e459beee1a3b9cea828fd4bdf8891 Mon Sep 17 00:00:00 2001 From: Daniel Freedman Date: Thu, 7 Feb 2019 11:45:13 -0800 Subject: [PATCH] Update externs from internal --- externs/polymer-externs.js | 10 ++++++++++ externs/webcomponents-externs.js | 10 +++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/externs/polymer-externs.js b/externs/polymer-externs.js index 8c426f3703..0c7b8ea458 100644 --- a/externs/polymer-externs.js +++ b/externs/polymer-externs.js @@ -47,6 +47,8 @@ PolymerInit.prototype.template; PolymerInit.prototype.hostAttributes; /** @type {(!Object | undefined)} */ PolymerInit.prototype.listeners; +/** @type {(!Object| !Array | undefined)} */ +PolymerInit.prototype.behaviors; /** @record */ let PolymerElementConstructor = function () {}; @@ -110,6 +112,8 @@ function JSCompiler_renameProperty(string, obj) {} function PolymerTelemetry() {} /** @type {number} */ PolymerTelemetry.instanceCount; +/** @type {function():void} */ +PolymerTelemetry.incrementInstanceCount; /** @type {Array} */ PolymerTelemetry.registrations; /** @type {function(HTMLElement)} */ @@ -125,6 +129,12 @@ Polymer.telemetry; /** @type {string} */ Polymer.version; +/** @type {boolean} */ +Polymer.legacyOptimizations; + +/** @type {boolean} */ +Polymer.syncInitialRender; + // nb. This is explicitly 'var', as Closure Compiler checks that this is the case. /** * @constructor diff --git a/externs/webcomponents-externs.js b/externs/webcomponents-externs.js index 99708b9e16..1d796ded48 100644 --- a/externs/webcomponents-externs.js +++ b/externs/webcomponents-externs.js @@ -18,8 +18,8 @@ var HTMLImports = { */ whenReady(callback) {}, /** - * @param {Element} element - * @returns {Document} document + * @param {!Node} element + * @return {?HTMLLinkElement|?Document|undefined} */ importForElement(element) {} }; @@ -42,7 +42,11 @@ var ShadyDOM = { /** * @param {Node} node */ - patch(node) {} + patch(node) {}, + /** + * @param {!ShadowRoot} shadowroot + */ + flushInitial(shadowroot) {} }; window.ShadyDOM = ShadyDOM;