I need to traverse the DOM tree for a specific attribute "tooltip". For each element that is found to have this attribute, we'll render a tooltip upon mousemove event on it. If I could make an action global that'll be perfect for this job. Normally this would be done by using use:myAction directive on each and every element.
Doing it this way improves the DX instead of heaving a separate Tooltip Component. And using it
I'm not going with the CSS method because I'll need to render html too inside the tooltip.
That I'd be able to do in svelte with @html.
P.S I'm not looking for "Why would you..." response. But if there is a better methodology for doing tooltips especially when you need a lot of them, I'll be more than happy to hear.