0

I'm trying to get the inner Y position of a browser window. I found this answer in which Y = window.screenY.

This actually doesn't help since it gives the position of the browser window including the title bar and extra browser bars such as address and bookmarks. Is there any way to get y position of the HTML content part itself?

Forepick
  • 919
  • 2
  • 11
  • 31

1 Answers1

0

I'm not sure what you're trying to do. So I don't know what will work for your situation. To get the Y position of <body> instead of window, you can do:

document.body.getBoundingClientRect()
JM-AGMS
  • 1,670
  • 1
  • 15
  • 33