Getting the shape/outline of an HTML node in JavaScript -


is possible shape/outline of dom node in javascript? kind of representation of shape or outline can tell pixels dom node occupies. can calculate rectangle using width, height, , position, doesn't take account border-radius property, among others.

i know have access of individual properties determine rendered outline of node (height, width, border-radius, etc), could, in javascript, reproduce calculations browser does. however, pretty tedious , there lot of edge cases.

and don't forget different browsers may render different. if interested in padding , margin well.


Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -