web-component-analyzer icon indicating copy to clipboard operation
web-component-analyzer copied to clipboard

Add handleEvent to HTML element method names

Open web-padawan opened this issue 5 years ago • 0 comments

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

web-padawan avatar Sep 01 '20 06:09 web-padawan