Using any valid css selector as a directive #3063
jimmywarting
started this conversation in
3. Feature Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Something i remembered from the AlngularJS 1.x days was that you could create a directive/template targeting one specific tag element.
So if i wanted to add some functionally to a specific element to eg polyfill stuff without having to add custom attributes to some element then i could do so with AngularJS 1.x.
I really wish there was some way to make something like:
or more precisely
I just create a simple
MutationObserver
myself to do this. and got this kind of working. then i reallies that AlpineJS kind of already dose this... but only forx-
attributes and better (more performant). i really wish i could target any tag/css selector elements in order to add functionality to some element without having to add custom attributes to stuff.Something i really dislike about react is that components are extending other components and using spread that it becomes so darn deeply nested dependent on stuff rather than just adding functionality to something pre existing...
I do not want to add so much custom attributes to my elements... i also wish to add this stuff to components that i do not control (that i import) so i do not directly have a way of adding
x-
to all elementsBeta Was this translation helpful? Give feedback.
All reactions