Remove web component definitions from DOM after defining them?
danieldietrich opened this issue · comments
It does not make sense to keep child web components (that are children of a web component's template) because the row content is copied to the DOM, including the template.
Decision
- we should remove child web components when processing a template
Implications
- we remove all web components from the html page
- we need to process web imports first, currently we need to process them last because otherwise we seem to define custom elements multiple times then, which leads to errors
- we don't need to set the status anymore on web import tags, which simplifies the code, we just log error on the console
Related
We should hide tags. This can be either done with CSS:
web-component, web-import {
display: none !important;
}
Alternatively this can be done declaratively:
<web-component name="..." hide></web-component>
<web-import src="..." hide></web-component>