The y property in DOMRectReadOnly interface is used to represents the y-coordinate of the DOMRect object. It is the read-only property.
var recX = DOMRect.y;
Return Value: It returns the y-coordinate of DOMRectReadOnly object.
Example: This example uses DOMRect.y property to get the y-coordinate of the DOMRect object.
- Before Click the Button:
- After Click the Button:
Supported Browsers: The browsers supported by DOMRectReadOnly y property are listed below:
- Google Chrome
- Safari 10.1
- Web API | DOMRectReadOnly x property
- CSS | transition-property Property
- CSS | all Property
- CSS | nav-right property
- CSS | nav-down property
- CSS | right Property
- CSS | top Property
- CSS | left Property
- CSS | perspective Property
- CSS | padding-right Property
- Web API | DOMRect right property
- CSS | resize Property
- CSS | align-self Property
- CSS | grid-row Property
- CSS | transform 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 firstname.lastname@example.org. 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.