[HTML-in-Canvas] Upcoming breaking changes

3 views
Skip to first unread message

HTML-in-Canvas developer newsletter

unread,
Jun 10, 2026, 1:36:31 PM (yesterday) Jun 10
to HTML-in-Canvas developer newsletter

Hello HTML-in-Canvas developer newsletter subscribers!

TL;DR: There're breaking changes in HTML-in-Canvas from Chrome 150+, and you need to update your implementation. Additionally, we're extending the origin trial through Chrome 154.

We're happy to see the massive interest in the API. We're seeing a lot of sign-ups for the origin trial, and we've already addressed some of the early community feedback.

Please be aware that starting in Chrome 150, the WebGLRenderingContext.texElementImage2D() and GPUQueue.copyElementImageToTexture() methods are changing. Note that this is a breaking change and you will need to update your codebase to ensure your solutions continue to function correctly in newer browser versions.

Summary of changes

  • texElementImage2D (WebGL): We are stripping away redundant arguments (level, srcFormat, destType):


// Old implementation
const level = 0;
const internalFormat = gl.RGBA;
const srcFormat = gl.RGBA;
const destType = gl.UNSIGNED_BYTE;
gl.texElementImage2D(
     gl.TEXTURE_2D,
     level,
     internalFormat,
     srcFormat,
     destType,
     element
);

// New implementation
const internalFormat = gl.RGBA8;
gl.texElementImage2D(gl.TEXTURE_2D, internalFormat, element);


  • copyElementImageToTexture (WebGPU): We are placing the parameters in standardized source and destination dictionary objects (sourceDict and destDict):

// Old implementation

GPUQueue.copyElementImageToTexture(

     element,

     width,

     height,

     { texture: texture }

);


// New implementation

const sourceDict = { source: element };

const destDict = {

     destination: { texture: texture },

     width: width,

     height: height

};

GPUQueue.copyElementImageToTexture(sourceDict, destDict);


Why these changes are necessary

These updates address the community feedback, reduce redundancy, and ensure that the API aligns with the rest of the ecosystem's structural standards. See the discussion on texElementImage2D and copyElementImageToTexture for more detail.

Origin trial extension

We appreciate the valuable feedback and API improvements suggested by the ecosystem, as well as the developers who have tried out HTML-in-Canvas. To address this feedback and ensure the API meets your needs, we're extending the origin trial through Chrome 154.

Do you have any further feedback? Let us know by filing an issue on GitHub.

Cheers,

The HTML-in-Canvas team


Reply all
Reply to author
Forward
0 new messages