SVGRectElement: width property - Web APIs | MDN
Value
Example
js
const rectangle = document.querySelector("rect");
const rectWidth = rectangle.width;
console.log(rectWidth.baseVal.value); // the `width` value
Specifications
| Specification |
|---|
| Scalable Vector Graphics (SVG) 2 # __svg__SVGRectElement__width |