Fix telemetry registrations to go eagerly

This commit is contained in:
Kevin Schaaf
2018-10-25 18:29:12 -07:00
parent c61df6f422
commit f17180341c
2 changed files with 1 additions and 4 deletions
-4
View File
@@ -303,10 +303,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
*/
static _finalizeClass() {
super._finalizeClass();
if (this.hasOwnProperty(
JSCompiler_renameProperty('is', this)) && this.is) {
Polymer.telemetry.register(this.prototype);
}
const observers = ownObservers(this);
if (observers) {
this.createObservers(observers, this._properties);
+1
View File
@@ -116,6 +116,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
* @suppress {missingProperties} Interfaces in closure do not inherit statics, but classes do
*/
static get observedAttributes() {
Polymer.telemetry.register(this.prototype);
const props = this._properties;
return props ? Object.keys(props).map(p => this.attributeNameForProperty(p)) : [];
}