-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmy_element.js
More file actions
21 lines (21 loc) · 703 Bytes
/
my_element.js
File metadata and controls
21 lines (21 loc) · 703 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import * as squint_core from 'squint-cljs/core.js';
import * as lit from 'lit';
class MyElement extends lit.LitElement {
constructor() {
super();const self__ = this;
this.name = "World";
this.count = 0; }
render() {
const this$ = this;
const self__ = this;let v__40434__auto__1 = lit.html`<h1>${this$["name"]}</h1><button @click=${this$["_onClick"]} part="button">Click Count: ${self__.count}</button>`;
return v__40434__auto__1;
}
_onClick() {
const this$ = this;
const self__ = this;self__.count = (self__.count + 1);
;
return this$.dispatchEvent(new CustomEvent("count-changed"));
}};
null;
MyElement["properties"] = ({ "count": ({ }) });
window.customElements.define("my-element", MyElement);