karoluS
karoluS

Reputation: 3218

Is there setClientBoundingRect()?

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

Answers (1)

tkore
tkore

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

Related Questions