fix(harbour-t3code): run T3 in-app via Gecko 91 compat layer (0.2.0) #2
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/gecko91-compat-layer"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Root cause
Reproduced on Firefox 91.13 ESR, the same Gecko as the SFOS 5.2 Browser/WebView:
TypeError: Object.hasOwn is not a function(Firefox 92+), so T3 shows "T3 Code could not load". This is the white/blank screen from 0.1.x. The bundle also needstoSorted,findLast,structuredClone,AbortSignal.any, and a few more. Its syntax is fine for FF91; only runtime APIs are missing.@layer(FF97+) and usesoklch()/color-mix()(FF113+). Gecko 91 drops all of it, so the page is unstyled.The earlier conclusion ("Gecko can't run the SPA") was wrong. Both gaps can be patched from inside the page.
Fix
qml/js/t3frame.js: WebView frame script. OnDOMWindowCreatedit evals the payload in the page global, before any page script runs.qml/js/t3compat.js:@layer(keeps layer order), converts literaloklch/lab/color-mixto rgb, mapsdvhtovh;color-mix(var())theme variables, which follows light/dark/theme switches;@layer+color-mix(the upcoming ESR115).WebViewPage: frame-script handshake, thenload(). The page stays hidden until#boot-shellis replaced; otherwise a diagnostics fallback appears.%installfrom a spec comment, which brokemb2("second %install").Verification
__t3Sfos.errorsis empty.messageManager.loadFrameScript, same mechanism as embedlite): handshake → injected → mounted.qmllintis clean and the scaffold check passes.🤖 Generated with Claude Code