←back to thread

293 points ulrischa | 2 comments | | HN request time: 0s | source
Show context
account42 ◴[] No.42174070[source]
Why are websites getting mouse position in screen coordinates in the first place?
replies(8): >>42174192 #>>42174200 #>>42174236 #>>42174247 #>>42174483 #>>42174549 #>>42174581 #>>42177418 #
Sayrus ◴[] No.42174236[source]
I've searched for reasons and couldn't find much. The fact that a website can know where a browser window is located (window.screenX/window.screenY) and that clicks position can be reported in that coordinate system sounds insane for a desktop. TOR Browser seems to spoof screenX and screenY to avoid fingerprinting.

Has anyone seen good use-cases for that feature? I'm thinking about dual window applications that interacts with each other (I think I saw a demo of something like this a while ago on HN but I wasn't able to find it again), or sites where behavior depends on their location on the virtual screen.

replies(3): >>42174288 #>>42175446 #>>42178604 #
1. thundermuffin ◴[] No.42178604[source]
Maybe this[1] is the demo you were thinking of? It's what came to mind when reading this chain at least.

[1] https://x.com/wesbos/status/1727730566143803522

replies(1): >>42179224 #
2. Sayrus ◴[] No.42179224[source]
Not the one I was thinking one but definitely the vibe, thanks for sharing.