Sha256: 80c356f105d18bf99d7a28e2b283651f3e479f832944d2a4870611588c71c697
Contents?: true
Size: 741 Bytes
Versions: 6
Compression:
Stored size: 741 Bytes
Contents
import { navigateTo } from "@helpers/location"; // Global JS navigation handler. // Optionally uses Turbo for the page navigation. window.addEventListener("navigate", (event) => { const { url, turbo, action } = event.detail; if (url) { navigateTo(url, { turbo, action }); } }); // Uodate the value of the `--app-height` css variable // when the viewport size changes. To help work around the // issues when using 100vh on mobile safari (https://medium.com/quick-code/100vh-problem-with-ios-safari-92ab23c852a8) function setAppHeightProperty() { document.documentElement.style.setProperty( "--app-height", `${window.innerHeight}px` ); } window.addEventListener("resize", setAppHeightProperty); setAppHeightProperty();
Version data entries
6 entries across 6 versions & 1 rubygems