Contact emails
[email protected], [email protected], [email protected], 
[email protected], [email protected]


Explainer
https://github.com/WICG/html-in-canvas


Specification
https://github.com/whatwg/html/pull/11588


Summary
HTML-in-canvas enables customizing the rendering of html using canvas with new 
primitives to manage canvas layout, drawing capabilities, rendering events for 
DOM-to-canvas synchronization, and geometry update capabilities for 
canvas-to-DOM synchronization.


Blink component
Blink>Canvas


Web Feature ID
canvas


Motivation
High-performance web applications rely on <canvas> for control over rendering 
that goes beyond standard HTML/CSS. However, by using <canvas>, they lose all 
the rich, built-in features of the web platform, including: * Advanced 
formatting, such as styled multi-line text. * Interactivity, such as 
copy&paste, forms, and text selection. * Accessibility. This forces a bad 
trade-off: developers must either re-implement these fundamental browser 
features in JS, or simply not provide them, resulting in a sub-par, 
inaccessible user experience.


Initial public proposal
https://logs.csswg.org/irc.w3.org/css/2024-06-12/#e1628190


TAG review
https://github.com/w3ctag/design-reviews/issues/1204


TAG review status
Pending


Origin Trial Name
html-in-canvas


Goals for experimentation
API shape


Chromium Trial Name
HTMLInCanvas


Origin Trial documentation link
https://github.com/WICG/html-in-canvas


WebFeature UseCounter name
kHTMLInCanvas


Goals for experimentation
None


Risks




Interoperability and Compatibility
This API exposes a small amount of new information which carries an interop 
risk, such as the pixels of gradients and form controls.

Gecko: No signal (https://github.com/mozilla/standards-positions/issues/1076)

WebKit: Positive (https://github.com/WebKit/standards-positions/issues/630) 
WebKit has begun early implementation work in 
https://github.com/WebKit/WebKit/pull/70542.

Web developers: Positive 
(https://github.com/whatwg/html/issues/10650#issuecomment-3324124682) We have 
positive signals from users of the Dev Trial and Origin Trials: 
https://github.com/whatwg/html/issues/10650#issuecomment-3324124682

Other signals:


Security
The feature reveals no new security information by only painting content that 
is safe to read back. This is described in a new "read-back allowed rendering" 
section of the explainer and accompanying spec: 
https://github.com/WICG/html-in-canvas#read-back-allowed-rendering.


WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it 
has potentially high risk for Android WebView-based applications?
No information provided



Debuggability
Content under canvas can be debugged like regular DOM content via devtools.


Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, 
ChromeOS, Android, and Android WebView)?
Yes
There are no platform restrictions. This is a new canvas/html feature and works 
on all platforms where those are supported, which is every platform.


Is this feature fully tested by web-platform-tests?
Yes
https://wpt.fyi/results/html/canvas/element/manual/draw-element-image?label=experimental&label=master&aligned


DevTrial instructions
https://github.com/WICG/html-in-canvas?tab=readme-ov-file#developer-trial-dev-trial-information


Flag name on about://flags
chrome://flags/#canvas-draw-element


Finch feature name
CanvasDrawElement


Rollout plan
Will ship enabled for all users


Requires code in //chrome?
False


Tracking bug
https://crbug.com/500967896


Measurement
CanvasHtml WebFeature counter: 
https://chromestatus.com/metrics/webfeature/timeline/popularity/445


Availability expectation
It is difficult to put an exact timeline on support in other browsers given the 
complexity of the feature, but the feature is expected to be implemented in all 
engines and not be a chromium-specific feature.


Adoption expectation
As this is a new platform primitive, the feature would immediately be 
considered best-practice once it reaches Web Platform baseline, and there is 
strong developer interest to use this immediately 
(https://github.com/whatwg/html/issues/10650#issuecomment-3324124682).


Adoption plan
The plan is to continue to actively engage with other implementors to support 
this feature in all browsers. We have documentation lined up to support this 
feature.


Estimated milestones


Shipping on desktop 157

Origin trial desktop first 148

Origin trial desktop last 150

Origin trial extension 1 end milestone 154

Origin trial extension 2 end milestone 160

DevTrial on desktop 138

Shipping on Android 157

Origin trial Android first 148

Origin trial Android last 150

DevTrial on Android 138

Shipping on WebView 157

Origin trial WebView first 148

Origin trial WebView last 150




Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop 
issues. Please list open issues (eg links to known github issues in the project 
for the feature specification) whose resolution may introduce web 
compat/interop risk (eg, changing to naming or structure of the API in a 
non-backward-compatible way).
All open comments have a proposed resolution and we don't expect substantive 
changes.


Link to entry on the Chrome Platform Status
https://chromestatus.com/feature/5172548013916160?gate=5186330228424704


Links to previous Intent discussions
Intent to Prototype: 
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/a473b17f-def6-4bb7-85ee-344947c5ecabn%40chromium.org
Intent to Experiment: 
https://groups.google.com/a/chromium.org/g/blink-dev/c/t_nGEmJ_v4s
Intent to Extend Experiment 1: 
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/6a2997ea.8b46cef5.209277.04ee.GAE%40google.com
Intent to Extend Experiment 2: 
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/6a9f2b61.81999fdc.3b7fb5.016d.GAE%40google.com



This intent message was generated by Chrome Platform Status.

-- 
You received this message because you are subscribed to the Google Groups 
"blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/6abd0a2e.082f26cb.5221b.0060.GAE%40google.com.

Reply via email to