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
First off, I'm really enjoying this library, so thanks for sharing it! It's been a great transition into custom elements from Stimulus development.
In some recent work, I wanted to extend a native element, HTMLAnchorElement in this case, when building my catalyst-controlled custom element. I ran into a roadblock when using the @controller decorator because it doesn't have a way to specify the extends option.
I like the ability extend native elements in order to limit the extraneous markup to add functionality, but I understand if this feels out of scope for a stimulus-type replacement.
The text was updated successfully, but these errors were encountered:
I understand if this feels out of scope for a stimulus-type replacement.
It's probably not strictly out of scope, but we have some we don't extend any built-in elements in our codebases for a few reasons that are documented in this eslint rule. The takeaways are:
As new features get added to HTML elements, custom elements that extend those built-in elements need to adopt those new features which can cause complications especially with regards to cross-browser support.
First off, I'm really enjoying this library, so thanks for sharing it! It's been a great transition into custom elements from Stimulus development.
In some recent work, I wanted to extend a native element,
HTMLAnchorElement
in this case, when building my catalyst-controlled custom element. I ran into a roadblock when using the@controller
decorator because it doesn't have a way to specify theextends
option.This could be done manually by the author:
Or inferred by the library code when defining the element:
I like the ability extend native elements in order to limit the extraneous markup to add functionality, but I understand if this feels out of scope for a stimulus-type replacement.
The text was updated successfully, but these errors were encountered: