Setting HTMLCanvasElement.width also resets context properties #38339
Labels
Content:WebAPI
Web API docs
help wanted
If you know something about this topic, we would love your help!
MDN URL
https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/width
What specific section or headline is this issue about?
Second paragraph
What information was incorrect, unhelpful, or incomplete?
The text states that the drawing buffer is reset after setting the width (or height, that article is also affected). However, all of the properties in the context are also reset to their default value, not just the drawing buffer. When I read this, I assumed that the canvas would be blanked, but properties like
fontKerning
would not be reset toauto
What did you expect to see?
It should be clear that the whole context is reset, not just the drawing buffer.
Do you have any supporting links, references, or citations?
https://html.spec.whatwg.org/multipage/canvas.html#concept-canvas-set-bitmap-dimensions
Do you have anything more you want to share?
No response
MDN metadata
Page report details
en-us/web/api/htmlcanvaselement/width
The text was updated successfully, but these errors were encountered: