2 ms·
Would this mean a canvas could also automatically resize? This would be a new era for html composition that could surpass iframes.
by koolala 1y ago
Would this mean a canvas could also automatically resize? This would be a new era for html composition that could surpass iframes.
- flohofwoe 1y agoIsn't this already trivial? You just need to be aware that the framebuffer size of a canvas element is different from its dom element size, but you can easily glue the canvas framebuffer size to the element size by listening for resize events (this is for webgl and webgpu canvases, don't know about 2d canvas)