width property

Gets the width, in CSS pixels, of a given box of text.

 

Syntax

object.get_width(number* p);

Property values

Type: number

Width of the given text, in CSS pixels.

Standards information

See also

ICanvasRenderingContext2D::measureText