I'm not sure about native web components but it definitely is possible within polymer. For instance my main polymer app file contains:
<module-landing>
<firebase-content path="pages/home/tagline"></firebase-content>
</module-landing>
and within my custom module-landing there is:
<template>
<style>
...
</style>
<module-inner size="1140px">
<h1 id="title">
<slot></slot>
</h1>
<img id="goDown" class="icon" src="" on-click="raiseCurtain">
</module-inner>
</template>
<script>
/**
* `module-landing`
* Full screen landing element with an arrow that scrolls itself out of the way, content is loaded through Firebase (requires firebase to be initialised in main app)
*
* @customElement
* @polymer
* @demo demo/index.html
*/
class ModuleLanding extends Polymer.Element {
static get is() { return 'module-landing'; }
static get properties() {
return {
height: {
type: Number
}
};
}
ready(){
super.ready();
this.height = this.offsetHeight;
this.$.goDown.src = this.resolveUrl("assets/white-down-arrow.png");
}
raiseCurtain(){
window.scroll({ top: this.height, left: 0, behavior: 'smooth' });
}
}
window.customElements.define(ModuleLanding.is, ModuleLanding);
(note the slot tags indicating where content nested within the custom element in the main file should appear, and the module-inner custom element inserted within the landing).
attachShadow) will make all the child tags not rendered - Eric