width property - CssRect class - dart:html library (original) (raw)
num getwidth
override
The width of this rectangle.
This is equivalent to the width
function in jQuery and the calculatedwidth
CSS value, converted to a dimensionless num in pixels. UnlikeElement.getBoundingClientRect, width
will return the same numerical width if the element is hidden or not.
Implementation
num get width;
setwidth (dynamic newWidth)
Set the current computed width in pixels of this element.
newWidth can be either a num representing the width in pixels or aDimension object. This is equivalent to the width
function in jQuery and the calculatedwidth
CSS value, converted to a dimensionless num in pixels.
Note that only the content width can be set via this method.
Implementation
set width(dynamic newWidth) {
throw new UnsupportedError("Can only set width for content rect.");
}