Skip to main content

Module browser_canvas_card

Module browser_canvas_card 

Source
Expand description

The picture in the approval card of a click or a drag in a canvas (docs/specs/SPEC_BACKGROUND_BROWSER_SESSIONS_2026_11_28.md §4.4): the canvas as the host captured it, its secret fields blacked out as in every screenshot, with the point (or the start and the end of the drag) marked. It is put in the question as image, a small JPEG the pane’s banner shows.

Constants§

HALO 🔒
MARK 🔒
MAX_SIDE 🔒
The widest picture in the card, in pixels: the host’s is about this already; a larger one is shrunk to it.
QUALITY 🔒
JPEG quality: the picture is only to see where the point is.

Functions§

jpeg_url 🔒
line 🔒
A line from a to b, in colour, width pixels thick.
mark 🔒
A dot, then a ring: a mark that shows on a light picture and on a dark one.
marked 🔒
The picture, shrunk to the card’s size, with the points (pixels of the canvas as drawn, drawn its size) marked: one for a click, two for a drag, which are joined by a line.
ring 🔒
A ring of radius and width pixels round (cx, cy), in colour.
with_card 🔒
What the person is asked, with the picture of the canvas in it when it is a canvas’s question. first is the host’s whole answer (its card is the capture), ask its needs_approval. A capture that could not be checked for secret fields is not shown, and then nothing is asked.