runem / lit-analyzer

Monorepository for tools that analyze lit-html templates

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Event listener props should allow an object with `handleEvent` method

aleclarson opened this issue · comments

See this page from the docs.

If you're not using decorators, you can customize event listener options by passing an object to the event listener expression. The object must have a handleEvent() method and can include any the options that would normally appear in the options argument to addEventListener().

render() {
  return html`<button @click=${{handleEvent: () => this.onClick(), once: true}}>click</button>`
}