Reputation: 3218
getClientBoundingRect
is a function that gets a position of element relative to viewport.
Is there a function that is able set value instead?
Upvotes: 0
Views: 186
Reputation: 1151
That's what CSS is for. You use CSS to position your elements in the viewport, and since getting the position of an element relative to a viewport and/or other elements is more problematic, you have getClientBoundingRect
(and a lot of other element-specific DOM API methods).
Upvotes: 3