3 ms·
Note to whoever comes across this comment in future. So I have now explored using HTMLElement as the Controller, its shallow DOM as a data source for its Model
by thomassmith65 2y ago
Note to whoever comes across this comment in future.
So I have now explored using HTMLElement as the Controller, its shallow DOM as a data source for its Model class, and its ShadowRoot as a subclass.
It is clear to me now that that design would be the most natural fit for MVC.
However... it is also impossible. For whatever infuriating reason, they designed custom element's ShadowDOM class to not be subclass-able. You can neither give a ShadowDOM subclass a constructor, nor does HTMLElement reveal any mechanism to 'attach' a ShadowDOM subclass.
Fantastic /s