HTMLCanvasElement.GetContext

HTMLCanvasElement.GetContext method

Returns a drawing context on the canvas, or null if the context ID is not supported. A drawing context lets you draw on the canvas.

public object GetContext(string contextId)
ParameterTypeDescription
contextIdStringIs a string containing the context identifier defining the drawing context associated to the canvas

Return Value

A RenderingContext

See Also