这是indexloc提供的服务,不要输入任何密码
Skip to content

Add an optional lang argument to OffscreenCanvas constructor #10862

@schenney-chromium

Description

@schenney-chromium

What is the issue with the HTML Standard?

The <canvas> DOM element, like all DOM elements, accepts a lang attribute that is used to define location specific treatment for font selection (when fonts have locale specific glyphs). Browsers respect this attribute. However, when an OffscreenCanvas is created in JS, there is no way to set locale information, possibly resulting in a state where an offscreen canvas produces rendered results that differ from the canvas in which it's output is used.

I propose adding an optional string lang parameter to the OffscreenCanvas constructor, and spec text indicating how offscreen canvases created from canvas elements should inherit the lang.

Both Chrome and Firefox on linux always use the system language settings for offscreen canvas, even when transferred from a canvas element, as far as I can tell.

Metadata

Metadata

Labels

i18n-trackerGroup bringing to attention of Internationalization, or tracked by i18n but not needing response.topic: canvas

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions