In Web API there is a DOMRect Interface which has a property height which gives us the height of the DOMRect object.
var recX = DOMRect.height;
Example: Getting height of the DOMRect object created.
Before clicking the button:
After clicking the button:
Supported Browsers: The browsers supported by DOMRect height property are listed below:
- Google Chrome
- Safari 10.1
- Web API | DOMRect right property
- Web API | DOMRect top property
- Web API | DOMRect bottom property
- Web API | DOMRect fromRect property
- Web API | DOMRect left property
- Web API | DOMRect width property
- Web DOMRect API | DOMRect() Constructor
- HTML width/height Attribute vs CSS width/height Property
- CSS | height Property
- CSS | max-height Property
- CSS | min-height Property
- CSS | line-height Property
- HTML | DOM Style height Property
- HTML | Screen height Property
- HTML | DOM embed height property
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.