Does not work correctly in a PWA standalone web app
When having a PWA standalone app (display property value is standalone in manifest.json as written in here https://developer.mozilla.org/en-US/docs/Web/Manifest/display) then this library does not work as expected - since address bar does not exist then things are calculated incorrectly.
Also having this issue, inspecting from Safari, on the initial load of the page, there is no --vh-offset var in the style attribute of the html tag. After I refresh the page from the web inspector of Safari, then the --vh-offset becomes available.
https://github.com/Hiswe/vh-check/assets/772730/6442644a-7222-4c42-a9d8-c89334afa572
This seems to solve the issue, at least so far.
document.addEventListener('DOMContentLoaded', () => {
vhCheck();
});