logoalt Hacker News

zamadatix10/10/20241 replyview on HN

Canvas can't "see the output", it only sees what is drawn in it (which is not a set of HTML tags, it's JS commands).

The screen recording/screen sharing API can be used for this but security is the reason you have to give explicit permission to the site before it can do this.


Replies

miki12321110/11/2024

IIRC, Firefox had a bug where this exact scenario was possible, I think you needed to embed the link in html embedded inside an SVG, which was displayed in the canvas, and then access the bitmap. You could e.g. make the link black if visited and white otherwise, and then the number of white versus black pixels in the bitmap would tell you whether the link was visited or not.

There was also that asteroids game / captcha where links were white/black squares and your goal was to click all the black ones. Of course, clicking a square revealed that you knew the square was black, which meant the URL under it was in your history.

show 1 reply