v160 · graphics · canvas
Mode reflection
The whole surface is one new creation setting: getContext("2d", { toneMapping: { mode } }), read back through getContextAttributes(). Build a context with any combination below — host, pixel format, and mode (including omitted, {} and an invalid string) — and compare what the browser reports with what the HTML spec PR and its WPT expect.
Shipping status & how to enable. Chrome 160 is planned to ship this enabled for everyone. Until then it sits behind the Blink runtime feature CanvasToneMapping (status experimental in runtime_enabled_features.json5). To run it today in Chrome or Canary: turn on chrome://flags/#enable-experimental-web-platform-features (there is no dedicated chrome://flags entry), or launch with --enable-blink-features=CanvasToneMapping. Seeing brighter-than-white pixels additionally needs an HDR-capable display and OS HDR mode — this page reports (dynamic-range: high) so you know which case you are in.
Probing this browser…
Create a context
| host | passed | expected mode | reported | result |
|---|
the call, verbatim
const ctx = canvas.getContext("2d", {
colorType: "float16", // HDR values need more than 8 bits
toneMapping: { mode: "extended" }, // CanvasToneMapping dictionary
});
ctx.getContextAttributes().toneMapping;
// → { mode: "extended" } (spec + WPT)
// default / {} / omitted → { mode: "standard" }
// { mode: "bogus" } → TypeError (CanvasToneMappingMode enum)
The setting is fixed at creation, like colorSpace and alpha: calling getContext("2d", …) again on the same canvas returns the existing context and ignores the new settings. This page always creates a fresh canvas for each run so you are never fooled by that.