With Javascript in DOM, I can use getBoundingClientRect to get the coordinate of the element, but it is based on viewport. The height of address bar and title bar are not included as I want to get the coordinate based on current browser window.
Is there a reliable method for get coordinate of element based on current browser window?
I tried use window.outerHeight - (window.innerHeight * window.devicePixelRatio)
as the height of address bar and title bar, but it seems unreliable like it will be incorrect if the download bar is showing up in the bottom of the browser window.