MCPcopy Create free account
hub / github.com/EasyWebApp/WebCell / XFirth

Class XFirth

test/WebCell.spec.tsx:118–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116 interface XFirth extends WebCell<XFirthProps> {}
117
118 @component({ tagName: 'x-firth' })
119 @observer
120 class XFirth extends HTMLElement implements WebCell<XFirthProps> {
121 @observable
122 accessor name: string | undefined;
123
124 @on('click', 'h2')
125 handleClick(
126 { type, detail }: CustomEvent<number>,
127 { tagName }: HTMLHeadingElement
128 ) {
129 this.name = [type, tagName, detail] + '';
130 }
131
132 render() {
133 return (
134 <h2>
135 <a>{this.name}</a>
136 </h2>
137 );
138 }
139 }
140 renderer.render(<XFirth />);
141
142 const tag = document.body.lastElementChild as XFirth;

Callers

nothing calls this directly

Calls 2

componentFunction · 0.90
onFunction · 0.90

Tested by

no test coverage detected