docs / Beyond ctx
get started

Beyond ctx

ctx is what Fave1 adds. The rest of the browser is there too — with a few rules, because on a site you run on someone else’s page.

card mode · app modereviewed

The browser, as usual

APIWhat to knowWhen
Web AudioStart it from a tap. On iPhone set navigator.audioSession.type = 'playback' while sound is on — or the silent switch mutes you — and back to 'auto' when it’s off or your app closesa tap
navigator.clipboardA Copy button needs no permission — call writeText() inside the tap. write() with a ClipboardItem copies a picture. Reading is not yours to do here — paste with ctx.clipboard.read(), which asks the person every time; review sends back apps that read the clipboard any other waya tap
navigator.shareThe phone’s share sheet, files included where canShare({ files }) says soa tap
downloadsAn <a download> with an object URL. Revoke the URL aftera tap
getDisplayMediaScreen capture and MediaRecorder. Call it inside the tap, and hide() Fave1 first. On a site the browser asks in that site’s name — say so in your panel. To keep the cursor out of it, set cursor: none on the page while you capture, or use pointer lock (below). Not inside My Fave1 — the frame doesn’t allow ita tap
requestPointerLockFine for a game or a capture. Lock inside the tap, and give the mouse back the moment that’s over — document.exitPointerLock() in a finally and in onDestroy. If they press Esc, stay unlocked until they tap again. Review sends back apps that lock at launch or never let go. Not inside My Fave1a tap
getUserMediaNot yours to call — on a site or in app mode. Use ctx.camera and ctx.mic, which ask in Fave1’s name and turn off when your app closes. Calling it yourself fails review—
motionDeviceOrientationEvent.requestPermission() on iPhone, inside the tap. Have a fallback — many devices and frames send nothinga tap
window.openA new tab or a small window — a share composer, your app in app modea tap
localStorage · IndexedDBOn a site this is the site’s storage, and its scripts can read it: prefix keys with your app ID and keep only what’s harmless — a local copy of prefs. In app mode it’s your ownany

“A tap” means inside the handler of the click or key that asked for it — browsers refuse these a moment later, even after one await.

The network

yes

What the page already loads

Its images, stylesheets and fonts, with fetch — the page’s CSP and each server’s CORS still apply. For a picture that won’t share, fetchImage().

yes

What they send on purpose

They tapped a service: open its own share or compose page with the link and words they chose. Nothing goes until they tap.

app mode only

One vendor SDK

A messenger’s share kit, say. In app mode only, a pinned version with an integrity hash, loaded when they’re about to use it, and named in Notes for reviewer.

no

Anything else out

No analytics, no trackers, no page content or activity sent to your server or anyone’s. Keep what lasts in ctx.storage, ctx.files, ctx.shared or ctx.pub.

no

A socket of your own

No WebSocket, no WebRTC, no long-poll to a server you run. People who need to see each other type meet in a ctx.live room, and two who need it fast open a direct line there — Fave1 holds both connections, and nothing about the page leaves them.

no

Code from the network

No eval, no new Function, no script tags on someone’s site. ctx.config is data, never code.

Review checks these. They’re the same rules Fave1’s own apps follow.