A new web API proposal introduces methods to render HTML content directly into Canvas 2D and WebGL contexts. The proposal includes layoutsubtree attribute for canvas elements, drawElement() for 2D rendering, texElement2D() for WebGL textures, and setHitTestRegions() for interactive elements. This addresses current limitations in canvas-based content regarding accessibility, internationalization, and complex text layouts. The API enables use cases like styled chart components, rich content in creative tools, HTML rendering in 3D contexts, and composing HTML with WebGL shaders.
Table of contents
StatusMotivationProposed solution: layoutsubtree , drawElement , texElement2D and setHitTestRegionsDemosDeveloper Trial (dev trial) InformationOther documents1 Comment
Sort: