How would I create a JS script that writes 'foo' on the line my mouse is currently over?

I tried to look for this in the docs but I couldn’t find out how to extract anything about mouse position.

Imagine I have a note open. I put my mouse over a specific line in my note, it could ‘Alpha beta gamma.’. And once I run this script it becomes ‘fooAlpha beta gamma.’.

I’m interested in using scripts to edit whatever line my mouse is over. That’s the purpose of this question. For that what I’d want is to figure out how to extract which line in which document my mouse is currently hovering.