[pointerevents] Title hover before/after show event (#475)

madprops has just created a new issue for https://github.com/w3c/pointerevents:

== Title hover before/after show event ==
I'm not sure if this is the right repo, but it is a pointer event.
I want to propose the addition of 1 or 2 events.
These are regarding the native  tooltips that use the title attribute when you hover an element.
I think an event is needed to build a title dynamically without causing needless processing.
In my case I build "timeago", relative times to dates in tooltips, so these have to be calculated every time the title is show. Think "2 minutes ago".
Right now the only way is listening on mouseover of `body` and changing the title before it pops up.
This triggers on every element as you move the mouse, lots of events.
Best I can do is use a debouncer to minimize the processing.
If a `tooltip` event was introduced, I could use it to build the title efficiently every time.
Since it will only be triggered when a tooltip is going to be shown and nothing more.

As you can see other people are looking for it:
https://stackoverflow.com/questions/47314675/is-there-an-event-for-when-the-title-attribute-shows-the-tooltip

Right now I decided to remove dynamic tooltips from my application simply because I'm concerned about the cpu processing happening on basically any mouse movement. If a `tooltip` or similar event existed I would have no trouble in using it, it would be clean and efficient. Either before-tooltip, or after-tooltip, or both.


Please view or discuss this issue at https://github.com/w3c/pointerevents/issues/475 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 23 June 2023 00:14:15 UTC