Problem is: there's no way to get the cursor location without capturing an event? So you can't wire this thing up on a timer. WTF DOM. You find something helpful, then find it's crippled by an obvious lack. Every fucking time.
Set a mousemove event handler on document.body, then update your overlay whenever the mouse moves.