Post

I like the idea. But why not go all in and open this mechanic for arbitrary CSS selectors? Then we could get lifecycle hooks for any element that we wish.

0 reposts3 likes

🙁 In my projects I usually use a Mutation Observer which recursively listens on the root node, that uses a target.matches() to decide if and how to initialize elements in the DOM. And that seems to do the job quick enough.