Skip to content
This repository has been archived by the owner on Jul 6, 2021. It is now read-only.

Agree on inheriting event listeners from the mixins #25

Closed
web-padawan opened this issue Dec 23, 2019 · 1 comment
Closed

Agree on inheriting event listeners from the mixins #25

web-padawan opened this issue Dec 23, 2019 · 1 comment
Labels

Comments

@web-padawan
Copy link
Member

From #23 (comment)

Just started thinking that why do we have this kind of event handlers (with very generic name) as protected API?

I think this can cause problems if the user/dev provides a base class that already has an event handler with similar generic name and this can also soon become a problem/conflict in our own classes.

Currently these implementations don't check for possible super method, but even if they would, I think it's somehow weird that we have these generic event name based methods as part of an abstract class that should define the API for this mixin behaviour, but these method names don't seem to be any way related to the mixin behaviour in my opinion.

Should we handle these in some other way?

Current implementation with the dumb classes workarounds microsoft/TypeScript#17744.

While it works, having generic names like _onKeyDown and _onClick is questionable.
We need to agree on the API we use, to make sure it is convenient and extensible.

@web-padawan
Copy link
Member Author

Closing as we no longer update this research project. Let's get back to this topic when we start migrating to Lit 2.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant