14 lines
278 B
JavaScript
14 lines
278 B
JavaScript
// @ts-check
|
|
import WebComponent from "../index.mjs";
|
|
|
|
class SimpleText extends WebComponent {
|
|
onInit() {
|
|
this.onclick = () => console.log(">>> click!");
|
|
}
|
|
|
|
get template() {
|
|
return `<span>Click me!</span>`;
|
|
}
|
|
}
|
|
|
|
customElements.define("simple-text", SimpleText);
|