Replies: 1 comment 1 reply
-
This is a unique instance where we want the best of both worlds. We want to compartmentalize all of the magic of setting up the element internals but put it into a discrete Lit controller, however, we also want it to create public api methods, getters, and setters on the class implementing the controller so that it more accurately reflects the existing api spec. Sounds like a job for either mixin or base class as Benny suggested. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The following was a discussion taken from internal GChat thread. Moving here for visibility.
Michael Potter:
@Benny Powers Looking at the internal controllers PR. When we use this controller, should we assign it to a public variable? So that implementors could use it when building forms.
#internals = new InternalsController(this);
to this:
internals = new InternalsController(this);
ref: https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/reportValidity
Benny Powers
internals should be internal i think
if devs using the component are having trouble using it when buildling a form, that's on us as component devs
should be
button.reportValidity()
instead. that could eventually be a mixin or a base class or somethingBeta Was this translation helpful? Give feedback.
All reactions