haXe API Documentation
Back | Index
extern class js.html.CanvasElement
extends Element
Available in js
DOM canvas elements expose the HTMLCanvasElement interface, which provides properties and methods for manipulating the layout and presentation of canvas elements. The HTMLCanvasElement interface inherits the properties and methods of the element object interface.

Documentation for this class was provided by MDN.
var height : Int

Reflects the

height HTML attribute, specifying the height of the coordinate space in CSS pixels.

var width : Int

Reflects the

width HTML attribute, specifying the width of the coordinate space in CSS pixels.

function getContext(contextId : String) : Dynamic
inline function getContext2d() : CanvasRenderingContext2D
A typed shortcut for getContext("2d").
inline function getContextWebGL(?attribs : js.html.webgl.ContextAttributes) : js.html.webgl.RenderingContext
function toDataURL(type : String) : String
Back | Index