Is there a way to get the position of the page / document (inner window) relative to the browser window?
For instance, there are properties on the window object like innerWidth / outerWidth which allow to get the width of the document renderer and width of the browser window respectively.
I could not find any properties that could determine position of the document within browser window. There's screenX, but it's position of the browser window relative to the screen.
Note that what affects the document position the most is devTools, which can be attached to either left, bottom or right edge of the screen. Also some browsers have sidebars. So it's not as simple as assuming that the docX relative to the window is 0 and docY = outerHeight - innerHeight
Is there any API available to get it?
Edit:
Example: Let's say the browser's tab and addressbar UI at the top is 150px in height and there's a sidebar to the left that has width of 200px. The position would be (200px,150px)