web-component-analyzer
web-component-analyzer copied to clipboard
Add handleEvent to HTML element method names
I'm using the handleEvent approach for event listeners in my Custom Element, and it looks like this:
constructor() {
super();
// ...
this.addEventListener('mousedown', this);
}
handleEvent(event) {
// do something
}
Currently, this results in handleEvent being included in the methods output from analyzer.
It would be good to consider handleEvent an internal implementation detail:
https://github.com/runem/web-component-analyzer/blob/87028d1f595740fd0beb5150c1b791710a63795a/src/analyze/flavors/custom-element/discover-methods.ts#L47-L49