I know that getBoundingClientRect()
returns an object of type ClientRect
or DOMRect
, and each usually has properties like x
, y
, width
, height
, and more. And if you typeof
those properties, you get Number
.
So my question is, that Number
is an amount of what? Pixels px
, points pt
, percentage %
, and things like that are possible answers. I think it is pixels, but I am not completely sure about that. Could anyone confirm this?
Thank you to @Ken White for confirming the answer:
getBoundingClientRect()
returns an array ofNumber
s that specify an amount of pixels (px).