You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like this mixin is not currently compatible with subclassing. A subclass should have it's own registry and be able to define or extend the elementDefinitions. Currently, this fails since the registry and elementDefinitions are only checked on the constructor.
To fix this, registry and elementDefinitions should be own property checks. In addition we need to provide some mechanism to extend elementDefinitions. We can either require users to explicitly add the super.elementDefinitions or do automatic composition as is done for properties.
The text was updated successfully, but these errors were encountered:
Just ran into this. Causing bugs here (fortunately not in production yet). Looking at using @open-wc/scoped-elements instead. This is the code in question:
kevinpschaaf
changed the title
[scoped-registry-mixin] Make compatible with subclassing
[labs/scoped-registry-mixin] Make compatible with subclassing
Oct 13, 2022
Description
It looks like this mixin is not currently compatible with subclassing. A subclass should have it's own registry and be able to define or extend the
elementDefinitions
. Currently, this fails since theregistry
andelementDefinitions
are only checked on the constructor.To fix this,
registry
andelementDefinitions
should be own property checks. In addition we need to provide some mechanism to extendelementDefinitions
. We can either require users to explicitly add thesuper.elementDefinitions
or do automatic composition as is done forproperties
.The text was updated successfully, but these errors were encountered: