JS script not working?

I’m trying to use JavaScript to make a Wix object follow my cursor, but it doesn’t seem to be working? It says it cannot read “addEventListener”…
Here’s my script:

var cursor = $w( ‘#vectorImage1’ );
$w.document.addEventListener( ‘mousemove’ , function (e){
var x = e.ClientX;
var y = e.ClientY;
cursor.style.left = x + “px” ;
cursor.style.top = y + “py” ;
})

Velo understands all of Javascript, except for anything that accesses the DOM. Accessing document elements such as div, span, button, etc is off-limits. The way to access elements on the page is only through $w.

See Coding with Velo for more information.