Cat/elements/cat-button.html

17 lines
430 B
HTML

<cat-template>
MY CONTENT.
</cat-template>
<script>
customElements.define('cat-basic', class extends HTMLElement {
static get observedAttributes() { return []; }
attributeChangedCallback(attr, oldValue, newValue) { this[attr] = newValue; }
constructor() {
super();
document.currentScript.ownerDocument.querySelector('cat-template').cloneTo(this);
}
connectedCallback() {
}
});
</script>