Sha256: 15622dd2a6861b9da24001ea1cb94c1f67dd1ab1a793863dc4baf5a995befa81
Contents?: true
Size: 754 Bytes
Versions: 18
Compression:
Stored size: 754 Bytes
Contents
import { navigateTo } from "@helpers/location"; // Global JS navigation handler. // Optionally uses Turbo for the page navigation. window.addEventListener("app:navigate", (event) => { const url = event.detail.url; if (url) { delete event.detail.url; navigateTo(url, event.detail); } }); // 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
18 entries across 18 versions & 1 rubygems