There is a way to use SetPosition of sorts, in the web, the website has to be fullscreen and then you have to set relative mode in the mouse, then you can use SetPosition, but it doesn't work in mobile, and I think it doesn't work in Safari either - or it has some bug there. If the user exits fullscreen - by using either Esc or any other way, then it will also unlock the mouse.
Overall I really recommend not relying on it for the web. I tried some hacks because I really wanted to use it - I use it to fake infinite mouse mode for my FPS games. But it seems the browser really have this with a ton of issues since they really want to protect the user from an evil website that could force you to click something.
Overall I really recommend not relying on it for the web. I tried some hacks because I really wanted to use it - I use it to fake infinite mouse mode for my FPS games. But it seems the browser really have this with a ton of issues since they really want to protect the user from an evil website that could force you to click something.