Suppose we have a <div> with a mousemove handler associated with it. If the mouse pointer enters and moves around this div , the event is fired.
However, I am dealing with a rich web application where <div> moves around the screen, appears and disappears ... It may happen that <div> appears under the mouse pointer. In this case, mousemove does not start. However, I need it. (Note that replacing mousemove with mouseover does not change this behavior.)
In particular, the <div> should be highlighted, and I consider it a drawback of the interface in order to require the user to slightly move the mouse to bring up the highlight.
Is it possible to programmatically fire the mousemove event? And I do not mean
document.getElementById('mydiv').onmousemove();
because onmousemove parameterized by an event object that I don't have.
Is it possible to make the browser behave as if onmousemove was launched in the current position of the mouse (although the mouse did not actually move)?
source share