attachAdapter
fun HTMLCanvasElement.attachAdapter(adapter: ElementViewAdapter<*>, applyDisplayScale: Boolean = true)
Attach an adapter to this
element. When applyDisplayScale is true
(the default), then the element will properly handle scaled high-DPI devices. This can be set to false
to prevent an infinite resize loop when the element's size is defined intrinsically by the canvas size.