Skip to content
This repository has been archived by the owner on Jun 6, 2019. It is now read-only.

innerHTML on non <template> elements does correctly upgrade <templates> #40

Closed
sorvell opened this issue Apr 30, 2018 · 0 comments
Closed
Assignees

Comments

@sorvell
Copy link
Contributor

sorvell commented Apr 30, 2018

The polyfill only patches innerHTML on elements. This means that setting innerHTML on a non-template element that includes a nested element will fail to upgrade that . It will therefore have childNodes and no content property.

To fix this, innerHTML should be patched on Element | HTMLElement.

@sorvell sorvell self-assigned this Apr 30, 2018
sorvell pushed a commit to Polymer/polymer that referenced this issue Apr 30, 2018
Use <template>.innerHTML when adding test elements to main document. Works around a template polyfill issue (webcomponents/template#40) by setting innerHTML on a <template> element so that inner templates are correctly updated.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant