As of Firefox 117, I intend to implement the getContextAttributes() method of the CanvasRenderingContext2D interface.

getContextAttributes allows content to query the attributes that were set when creating a CanvasRenderingContext2D; this may be needed because just calling getContext("2d", [options]) on a <canvas> will return a pre-existing context for the canvas element, if there is one, even if it was created with different options. So a script that cares about the options may want to verify what it got back from getContext().

Supported in both Blink and WebKit.

Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1517786

Standard: https://html.spec.whatwg.org/multipage/canvas.html#2dcontext

Testing: https://wpt.fyi/results/html/canvas/element/manual/context-attributes/getContextAttributes.html

Platform coverage: All

Restricted to secure contexts: No; the entire CanvasRenderingContext2D interface is not restricted.

Target Release: 117

Preferences behind which this will be implemented: none

--
You received this message because you are subscribed to the Google Groups 
"[email protected]" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/mozilla.org/d/msgid/dev-platform/23500393-d7d1-ac3c-4037-d1d233f32d25%40gmail.com.

Reply via email to