[I18nElement base class] registered lifecycle callback is not called for extended Polymer classes but the 1st one
Root Cause
import { I18nElement } from "i18n-element/i18n-element.js", which is identical to BaseElements.I18nElement, is a constant PolymerGenerated class object whose PolymerGenerated.prototype.__hasRegisterFinished property is set as true when the first element instance is created, which prevents other extended element classes from calling their own registered lifecycle callbacks
Partial Fix
Make BaseElements.I18nElement a dynamic property
Note: No source compatible fix for import { I18nElement } from "i18n-element/i18n-element.js"
[I18nElement base class] registered lifecycle callback is not called for extended Polymer classes but the 1st one
Root Cause
import { I18nElement } from "i18n-element/i18n-element.js"
, which is identical toBaseElements.I18nElement
, is a constantPolymerGenerated
class object whosePolymerGenerated.prototype.__hasRegisterFinished
property is set astrue
when the first element instance is created, which prevents other extended element classes from calling their ownregistered
lifecycle callbacksPartial Fix
BaseElements.I18nElement
a dynamic propertyimport { I18nElement } from "i18n-element/i18n-element.js"
Workaround
Mixins.Localizable(LegacyElementMixin(HTMLElement))
for each extended element class instead ofI18nElement
import { LegacyElementMixin } from '@polymer/polymer/lib/legacy/legacy-element-mixin.js';
Notes