Query
Allows user to query the light dom or shadow dom (if attached) for
Installation:
npm i @joist/query
const template = document.createElement('template');
template.innerHTML = `
<input name="fname" />
`;
class MyElement extends HTMLElement {
@query('input') input!: HTMLInputElement;
constructor() {
this.attachShadow({ mode: 'open' });
}
connectedCallback() {
this.shadowRoot!.appendChild(template.content.clone(true));
}
}