The canvas element provides scripts with a resolution-dependent bitmap canvas, which can be used for rendering graphs, game graphics, art, or other visual images on the fly.

Canvas {
       width = 800;
       height = 600;
    id = "myCanvas";
}

Technical details about this element can be found on the Official W3C reference

no subtypes hierarchy

Initializer
Canvas(Integer witdh, Integer height, String? id = null, CssClass classNames = [], String? style = null, String? accessKey = null, String? contextMenu = null, TextDirection? dir = null, Boolean? draggable = null, DropZone? dropZone = null, Boolean? inert = null, Boolean? hidden = null, String? lang = null, Boolean? spellcheck = null, Integer? tabIndex = null, Boolean? translate = null, Aria? aria = null, DataContainer data = ...)
Parameters:
  • id = null
  • classNames = []
  • style = null
  • accessKey = null
  • contextMenu = null
  • dir = null
  • draggable = null
  • dropZone = null
  • inert = null
  • hidden = null
  • lang = null
  • spellcheck = null
  • tabIndex = null
  • translate = null
  • aria = null
  • data = empty
Attributes
attributesSource Codeshared actual <String->Object>[] attributes
Refines BaseElement.attributes ultimately refines Node.attributes
childrenSource Codeshared actual {String|BlockOrInline|{String|BlockOrInline*}|Snippet<BlockOrInline>|Null*} children
heightSource Codeshared Integer height
tagSource Codeshared actual Tag tag

The tag name and type.

Refines Node.tag
textSource Codeshared actual String text
witdhSource Codeshared Integer witdh
Inherited Attributes
Attributes inherited from: BaseElement
Attributes inherited from: Element
Attributes inherited from: Object
Attributes inherited from: StyledElement
Attributes inherited from: Node
Attributes inherited from: ParentNode<Child>
Attributes inherited from: TextNode
Inherited Methods
Methods inherited from: Object