You're reading the Rask v1.0.0 guides.View source
All guides

Browser & device API capability matrix

Every typed browser/device API wrapper Rask ships, and where it works. Inject the interface and the framework resolves the implementation for the host. Each API links to its own reference page; the narrative overview (with the three-homes rationale and the subscription pattern) is browser-apis.md.

Legend — ✅ injectable service · 🟡 reachable on Server via a declarative gesture component (runs the activation-gated call inside a click), not as an injected service · ⬜ not available · — n/a.

The third column is for the front ends that are not Rask components — a TypeScript SPA, or a meta framework. There you do not inject anything: you either import the module named, which is the very code Rask's own C# wrapper calls through, or you call the platform, because lib.dom.d.ts already types it better than a wrapper would. See TypeScript front ends → Browser APIs.

API Web / Server PWA / WASM TypeScript front end
IBrowserStorage the platform
ICookies browser/cookies
IClipboard the platform
IGeolocation browser/geolocation
IPermissions browser/permissions
IVibration the platform
IPageVisibility the platform
INavigatorInfo the platform
INetworkInfo browser/networkInformation
IBattery browser/battery
IMediaQuery browser/mediaQuery
ISpeechSynthesis browser/speechSynthesis
ISpeechRecognition browser/speechRecognition
IMediaSession browser/mediaSession
IDeviceOrientation browser/deviceOrientation
IDeviceMotion browser/deviceMotion
IScreenInfo browser/screen
IStorageEstimator browser/storageManager
IVisualViewport browser/visualViewport
ICrypto browser/crypto
IPerformance browser/performance
IIndexedDb browser/indexedDb
IFileSystemAccess browser/fileSystem
IOriginPrivateFileSystem browser/originPrivateFileSystem
IWebAuthn browser/webAuthn
IWebLocks browser/webLocks
IMediaStreams browser/mediaDevices
ISignaling browser/signaling
IWebRtc the platform
IBroadcastChannel browser/broadcastChannel
IIntersectionObserver browser/intersectionObserver
IResizeObserver browser/resizeObserver
IMutationObserver browser/mutationObserver
IGamepad browser/gamepad
IWebPush browser/webPush
INotifications browser/notifications
IBadge browser/badge
IWakeLock browser/wakeLock
IShare 🟡 the platform
IFullscreen 🟡 browser/fullscreen
IScreenOrientation 🟡 browser/screenOrientation
IEyeDropper 🟡 browser/eyeDropper
IPictureInPicture 🟡 browser/pictureInPicture
IInstallPrompt 🟡 browser/installPrompt
IMediaDevices 🟡 browser/mediaDevices
IIdleDetector the platform
ISerial the platform
IUsb the platform
IHid the platform
IBluetooth the platform
IBackgroundSync the platform

Notes

  • Web / Server is the ASP.NET host (per-session, over WebSocket). The 38 transport-agnostic wrappers register there; the activation-gated ones (🟡) can't be injected but are reachable through declarative gesture components that run the call inside the click gesture. All six ship: FullscreenTrigger, ScreenOrientationTrigger, EyeDropperTrigger, InstallTrigger, MediaCaptureTrigger, and PictureInPictureTrigger (plus the generic GestureTrigger). The last two target a <video> via its ElementRef.
  • PWA / WASM is the in-browser WebAssembly host, which registers the full set.
  • TypeScript front end is an SPA or a meta framework. On the SPA lane the modules arrive in src/rask/browser/; on the meta lane they arrive in whichever source directory that framework uses and are imported as @rask/browser/… through a tsconfig path — see meta.md. Read the 🟡 and ⬜ rows there carefully: those restrictions are properties of the SERVER TRANSPORT, not of the API. Fullscreen, the eye dropper, screen orientation, picture-in-picture, the install prompt, media capture and the device APIs are limited on Server because they need transient user activation, which a WebSocket round trip loses. A TypeScript front end calls them inside the click's own stack, so every row above is available to it — the column only says whether Rask ships a module or you call the platform.
  • "The platform" is not a lesser answer. navigator.clipboard.writeText, localStorage, element.animate(), RTCPeerConnection and navigator.serial are native, already typed, and a wrapper would only stand between you and them. Rask ships a module where the platform leaves real work to you — a callback API that should be a promise, a live object that has to be snapshotted, a base64url ceremony — or where the other half is Rask's own server (signaling, webPush).
  • Push subscription (IWebPush) and the PWA APIs (INotifications, IBadge, IWakeLock) work on Server too, but their JS helpers ship only under AddRaskPwa — see pwa.md.