Pwa support, maybe

This commit is contained in:
2026-07-21 15:13:16 +10:00
parent 49cecad06d
commit ee25b9a94d
8 changed files with 109 additions and 2 deletions

View File

@@ -36,6 +36,7 @@ function updateEnvironment() {
document.documentElement.dataset.pwaPlatform = state.ios ? 'ios' : 'other'
document.documentElement.dataset.pwaDisplayMode = state.standalone ? 'standalone' : 'browser'
document.documentElement.dataset.pwaEdgeGuard = state.edgeGuard ? 'active' : 'inactive'
document.documentElement.dataset.pwaEdgeClaims = String(state.edgeClaims)
}
export interface PwaAdapterOptions {
@@ -81,6 +82,7 @@ export function createPwaAdapter(options: PwaAdapterOptions = {}): NativePlatfor
if (!touch) return
reservedTouch = touch.identifier
state.edgeClaims += 1
document.documentElement.dataset.pwaEdgeClaims = String(state.edgeClaims)
event.preventDefault()
}
const holdEdge = (event: TouchEvent) => {