3 ms·
While that's possible, it's a lot more fault tolerant to use the declarative :hover rule, than it is to handle it procedurally. The browser knows how to handle
by graypegg 3y ago
While that's possible, it's a lot more fault tolerant to use the declarative :hover rule, than it is to handle it procedurally. The browser knows how to handle odd pointing devices, touch states and won't ever have to deal with uncaught errors in a mouseover/mouseout event.
- teg4n_ 3y agofor sure, was just an example that there are apis, that could have been reached for even without CSS knowledge that would make it easier than trying to get the position of the mouse on the screen, the position of the target element and if they overlap