Probes: recent platform features on elements a canvas draws
Each probe puts a small element in a <canvas content="drawable">, turns on one feature that shipped in Chrome 130 to 160,
draws the element with drawElementImage() and reads the pixels, the hit test or the element state back.
The results feed the plan for new platform features.
Not run yet. The table shows the results recorded in the test browser.
Show the code the fixture and the probes
- The fixture: one canvas, one drawable child, draw it at an offset and read pixels back.
ownPaint()waits for apaintevent that the browser raises with norequestPaint()call. - All the probes. Each one sets up markup and CSS for one feature and returns a status and a sentence.
Results
| Probe | Result | Detail |
|---|
Feature detection in this browser
Presence only. A feature that is present can still fail on a canvas child; the probes above test that.
Findings
- The recorded column comes from
npm run record:probes, which runs this page in two Chromium builds with real mouse and keyboard input and writes/chrome-apis/probes-recorded.json. - Three probes need a real pointer or key press (
::scroll-markerclick,interestforhover,focusgrouparrow keys). The recording script supplies them. In a browser they report manual. - The
:visitedprobe needs a browser profile that keeps history. The Chromium 153 run uses one and compares the picture with a screenshot of the same link outside the canvas.