The experimental "HTML-in-Canvas" API (Chrome dev-trial; Origin Trial M148–M150, behind
chrome://flags/#canvas-draw-element) lets a <canvas> draw its own element children into
the bitmap while they stay the live, accessible, hit-testable source of truth. We feature-
detect the shipped 2D entry point and fall back to the DOM-overlay path everywhere else —
the library is fully functional and fully accessible via the overlay regardless.
The 2D method was renamed drawElement → drawHTMLElement → drawHTML → drawElementImage,
and the older aliases were removed at Chrome M145. We detect the current name only; detecting
a removed alias (or the incidental WebGL texElementImage2D) would falsely report support.
HTML-in-Canvas feature detection.
The experimental "HTML-in-Canvas" API (Chrome dev-trial; Origin Trial M148–M150, behind
chrome://flags/#canvas-draw-element) lets a<canvas>draw its own element children into the bitmap while they stay the live, accessible, hit-testable source of truth. We feature- detect the shipped 2D entry point and fall back to the DOM-overlay path everywhere else — the library is fully functional and fully accessible via the overlay regardless.The 2D method was renamed
drawElement→drawHTMLElement→drawHTML→drawElementImage, and the older aliases were removed at Chrome M145. We detect the current name only; detecting a removed alias (or the incidental WebGLtexElementImage2D) would falsely report support.