WebReflection / hyperHTML-Element

An extensible class to define hyperHTML based Custom Elements.
ISC License
202 stars 25 forks source link

Alternative to `on` prefix for event listeners #73

Closed brettz9 closed 3 years ago

brettz9 commented 3 years ago

I'm wondering if, for the sake of preventing potential conflicts, you would consider it helpful to making the "on" prefix convention customizable in some manner (or whether you would just expect such users to rely on data-call).

GitHub has a rule to prevent use of on for custom elements due to the possibility of these global events becoming extended, and it would seem to me to be a reasonable concern (even if it doesn't address addEventListener type conflicts). But having a convention such that one could just define methods beginning with event_ or what not, also seems useful to me.

Maybe not too big of a real world concern, but thought I'd request your thoughts on it.

WebReflection commented 3 years ago

Screenshot from 2021-07-19 08-03-35