mirror of
https://github.com/Polymer/polymer.git
synced 2025-02-25 18:55:30 -06:00
Fix more closure warnings.
This commit is contained in:
590
closure.log
590
closure.log
File diff suppressed because it is too large
Load Diff
@@ -144,10 +144,6 @@ Polymer_TemplateStamp.prototype._removeEventListenerFromNode = function(node, ev
|
||||
function Polymer_PropertyEffects(){}
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
Polymer_PropertyEffects.prototype._initializeProperties = function(){};
|
||||
/**
|
||||
* @override
|
||||
* @param {*} props
|
||||
*/
|
||||
Polymer_PropertyEffects.prototype._initializeProtoProperties = function(props){};
|
||||
|
||||
@@ -22,7 +22,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
* @constructor
|
||||
* @implements {Polymer_PropertyEffects}
|
||||
* @implements {Polymer_OptionalMutableData}
|
||||
* @implements {Polymer_GestureEventListener}
|
||||
* @implements {Polymer_GestureEventListeners}
|
||||
* @extends {HTMLElement}
|
||||
*/
|
||||
const domBindBase =
|
||||
|
||||
@@ -14,6 +14,18 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
let TemplateInstanceBase = Polymer.TemplateInstanceBase; // eslint-disable-line
|
||||
/**
|
||||
* @typedef {{
|
||||
* _parentModel: boolean,
|
||||
* _instanceProps: Object,
|
||||
* _forwardHostPropV2: Function,
|
||||
* _notifyInstancePropV2: Function,
|
||||
* ctor: TemplateInstanceBase
|
||||
* }}
|
||||
*/
|
||||
let TemplatizerUser; // eslint-disable-line
|
||||
|
||||
/**
|
||||
* The `Polymer.Templatizer` behavior adds methods to generate instances of
|
||||
* templates that are each managed by an anonymous `Polymer.PropertyEffects`
|
||||
@@ -87,6 +99,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
* @param {boolean=} mutableData When `true`, the generated class will skip
|
||||
* strict dirty-checking for objects and arrays (always consider them to
|
||||
* be "dirty"). Defaults to false.
|
||||
* @this {TemplatizerUser}
|
||||
*/
|
||||
templatize(template, mutableData) {
|
||||
this._templatizerTemplate = template;
|
||||
@@ -110,6 +123,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
* populate into the template bindings.
|
||||
* @return {TemplateInstanceBase} Returns the created instance of
|
||||
* the template prepared by `templatize`.
|
||||
* @this {Polymer_LegacyElementMixin}
|
||||
*/
|
||||
stamp(model) {
|
||||
return new this.ctor(model);
|
||||
@@ -124,6 +138,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
* @param {HTMLElement} el Element for which to return a template model.
|
||||
* @return {TemplateInstanceBase} Model representing the binding scope for
|
||||
* the element.
|
||||
* @this {Polymer_LegacyElementMixin}
|
||||
*/
|
||||
modelForElement(el) {
|
||||
return Polymer.Templatize.modelForElement(this._templatizerTemplate, el);
|
||||
|
||||
@@ -117,6 +117,13 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
this.__serializing = false;
|
||||
this.__dataCounter = 0;
|
||||
this.__dataInitialized = false;
|
||||
this.__dataInvalid = false;
|
||||
this.__data = {};
|
||||
this.__dataPending = null;
|
||||
this.__dataOld = null;
|
||||
this._initializeProperties();
|
||||
}
|
||||
|
||||
@@ -135,14 +142,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
* @protected
|
||||
*/
|
||||
_initializeProperties() {
|
||||
this.__serializing = false;
|
||||
this.__dataCounter = 0;
|
||||
this.__dataInitialized = false;
|
||||
this.__dataInvalid = false;
|
||||
// initialize data with prototype values saved when creating accessors
|
||||
this.__data = {};
|
||||
this.__dataPending = null;
|
||||
this.__dataOld = null;
|
||||
if (this.__dataProto) {
|
||||
this._initializeProtoProperties(this.__dataProto);
|
||||
this.__dataProto = null;
|
||||
|
||||
@@ -1073,15 +1073,8 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
return TYPES;
|
||||
}
|
||||
|
||||
/**
|
||||
* Overrides `Polymer.PropertyAccessors` implementation to initialize
|
||||
* additional property-effect related properties.
|
||||
*
|
||||
* @override
|
||||
*/
|
||||
_initializeProperties() {
|
||||
super._initializeProperties();
|
||||
this.__dataClientsInitialized = false;
|
||||
constructor() {
|
||||
super();
|
||||
this.__dataPendingClients = null;
|
||||
this.__dataToNotify = null;
|
||||
this.__dataLinkedPaths = null;
|
||||
@@ -1090,6 +1083,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
this.__dataCompoundStorage = this.__dataCompoundStorage || null;
|
||||
this.__dataHost = this.__dataHost || null;
|
||||
this.__dataTemp = {};
|
||||
this.__dataClientsInitialized = false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -59,6 +59,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
* @implements {Polymer_PropertyEffects}
|
||||
*/
|
||||
const base = Polymer.PropertyEffects(class {});
|
||||
/** @unrestricted */
|
||||
class TemplateInstanceBase extends base {
|
||||
constructor(props) {
|
||||
super();
|
||||
@@ -190,7 +191,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
* is either another templatize instance that had option `parentModel: true`,
|
||||
* or else the host element.
|
||||
*
|
||||
* @return {Polymer.PropertyEffectsInterface} The parent model of this instance
|
||||
* @return {Polymer_PropertyEffects} The parent model of this instance
|
||||
*/
|
||||
get parentModel() {
|
||||
let model = this.__parentModel;
|
||||
@@ -207,19 +208,22 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
return model;
|
||||
}
|
||||
}
|
||||
/** @type {HTMLTemplateElement} */
|
||||
/** @type {DataTemplate} */
|
||||
TemplateInstanceBase.prototype.__dataHost = null;
|
||||
/** @type {Object} */
|
||||
TemplateInstanceBase.prototype.__templatizeOptions = null;
|
||||
/** @type {Object} */
|
||||
/** @type {Polymer_PropertyEffects} */
|
||||
TemplateInstanceBase.prototype._methodHost = null;
|
||||
/** @type {Object} */
|
||||
TemplateInstanceBase.prototype.__dataHost = null;
|
||||
/** @type {Object} */
|
||||
TemplateInstanceBase.prototype.__templatizeOwner = null;
|
||||
/** @type {Object} */
|
||||
TemplateInstanceBase.prototype.__hostProps = null;
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @extends {TemplateInstanceBase}
|
||||
* @implements {Polymer_MutableData}
|
||||
*/
|
||||
const MutableTemplateInstanceBase = Polymer.MutableData(TemplateInstanceBase);
|
||||
|
||||
function findMethodHost(template) {
|
||||
@@ -234,9 +238,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
|
||||
function createTemplatizerClass(template, templateInfo, options) {
|
||||
// Anonymous class created by the templatize
|
||||
/**
|
||||
* @unrestricted
|
||||
*/
|
||||
/** @unrestricted */
|
||||
let base = options.mutableData ?
|
||||
MutableTemplateInstanceBase : TemplateInstanceBase;
|
||||
let klass = class extends base { }
|
||||
@@ -416,9 +418,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
*
|
||||
* @memberof Polymer.Templatize
|
||||
* @param {HTMLTemplateElement} template Template to templatize
|
||||
* @param {*} owner Owner of the template instances; any optional callbacks
|
||||
* will be bound to this owner.
|
||||
* @param {*=} options Options dictionary (see summary for details)
|
||||
* @param {Polymer_PropertyEffects} owner Owner of the template instances;
|
||||
* any optional callbacks will be bound to this owner.
|
||||
* @param {Object=} options Options dictionary (see summary for details)
|
||||
* @return {TemplateInstanceBase} Generated class bound to the template
|
||||
* provided
|
||||
*/
|
||||
@@ -464,28 +466,28 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
* @memberof Polymer.Templatize
|
||||
* @param {HTMLTemplateElement} template The model will be returned for
|
||||
* elements stamped from this template
|
||||
* @param {HTMLElement} el Element for which to return a template model.
|
||||
* @param {Node} node Node for which to return a template model.
|
||||
* @return {TemplateInstanceBase} Template instance representing the
|
||||
* binding scope for the element
|
||||
*/
|
||||
modelForElement(template, el) {
|
||||
modelForElement(template, node) {
|
||||
let model;
|
||||
while (el) {
|
||||
while (node) {
|
||||
// An element with a __templatizeInstance marks the top boundary
|
||||
// of a scope; walk up until we find one, and then ensure that
|
||||
// its __dataHost matches `this`, meaning this dom-repeat stamped it
|
||||
if ((model = el.__templatizeInstance)) {
|
||||
if ((model = node.__templatizeInstance)) {
|
||||
// Found an element stamped by another template; keep walking up
|
||||
// from its __dataHost
|
||||
if (model.__dataHost != template) {
|
||||
el = model.__dataHost;
|
||||
node = model.__dataHost;
|
||||
} else {
|
||||
return model;
|
||||
}
|
||||
} else {
|
||||
// Still in a template scope, keep going up until
|
||||
// a __templatizeInstance is found
|
||||
el = el.parentNode;
|
||||
node = node.parentNode;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
@@ -493,6 +495,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
}
|
||||
|
||||
Polymer.Templatize = Templatize;
|
||||
Polymer.TemplateInstanceBase = TemplateInstanceBase;
|
||||
|
||||
})();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user