26 lines
561 B
JavaScript
26 lines
561 B
JavaScript
import "./feature-short-header.js"
|
|
|
|
const TEMPLATE = document.createElement("template")
|
|
TEMPLATE.innerHTML = `
|
|
<camp-feature-short-header class="feature-header" ></camp-feature-short-header>
|
|
`
|
|
|
|
export class FeatureElement extends HTMLElement {
|
|
|
|
feature
|
|
|
|
connectedCallback(){
|
|
this.updateContent()
|
|
}
|
|
|
|
updateContent(){
|
|
this.replaceChildren(TEMPLATE.content.cloneNode(true))
|
|
|
|
let header = this.querySelector("camp-feature-short-header")
|
|
header.feature = this.feature
|
|
header.updateContent()
|
|
}
|
|
|
|
}
|
|
|
|
customElements.define("camp-feature", FeatureElement)
|