← Back to release summary

OffscreenCanvas getContextAttributes

Category
Graphics
Type
Chromium catches up
Status
Enabled by default (Chrome 134)
Intent stage
None

Summary

Add the getContextAttributes interface from CanvasRenderingContext2D to OffscreenCanvasRenderingContext2D.

Motivation

There is a lot of duplicated spec text for CanvasRenderingContext2D and OffscreenCanvasRenderingContext2D, especially related to how CanvasRenderingContext2DSettings is handled. As with all things that are duplicated, there are accidental divergences. Among the most prominent accidental divergences is that getContextAttributes was accidentally not added to OffscreenCanvasRenderingContext2D when it was added to CanvasRenderingContext2D. This fixes that (and the spec fixed several other divergences that were also accidental, but Chrome had accidentally not diverged the implementation, e.g, willReadFrequently).

Standards & signals

View on chromestatus.com