ZIM Frame Tag mode (without dimensions)

This template shows how to place a DIMENSIONLESS Canvas in an HTML element with a specified tag ID (holder in this case). ZIM Frame will make the Canvas with an id the same as the holder tag but with the word Canvas added to the end. The stage size will be set to the holder tag dimensions - the content is not scaled so you need to size / scale items with code (like in Full mode).

Frame uses appendChild() to add the canvas tag to the specified element. offsetWidth and offsetHeight are used to measure the element and values are updated in the resize event. CSS overflow:hidden is used to show the canvas only in the element.