t2ym / i18n-element

I18N Base Element for Lit and Polymer
Other
9 stars 1 forks source link

[ShadyDOM] Not Found Exception on node.innerHTML = '' #14

Closed t2ym closed 7 years ago

t2ym commented 7 years ago

With Shady DOM, Not Found exception is thrown on node.innerHTML = '' in i18n-format parameter construction by i18n-behavior. The issue is not reproducible with native Shadow DOM.

Root Cause:

In some cases, ShadyDOM cannot properly track implicitly removed nodes which have been appended to another parentNode by appendChild()

Workaround:

Clear childNodes BEFORE implicit removals by appendChild()