JavaScript APIs overview
Oro Runtime apps run inside the platform WebView. You use standard web APIs (DOM, ES modules, fetch, URLs, WebCrypto,
WebAssembly) and import Oro-specific native capabilities as explicit ES modules under the oro:* namespace.
Web APIs are globals#
Use fetch, URL, Headers, Request, Response, AbortController, streams, Worker, SharedWorker, localStorage, and navigator.serviceWorker directly. They need no oro:* imports. The web platform guide covers networking, storage, media, cryptography, files, device capabilities, and platform differences.
Build an interface with React and Vite or another static frontend tool, then package it for Android and iOS.
How the JavaScript surface is organized#
The runtime’s JavaScript surface is broad, but it stays predictable:
- Application shell —
oro:application,oro:window,oro:hooks,oro:navigation - Filesystem and process —
oro:fs,oro:path,oro:os,oro:process,oro:child_process - Networking and transport —
oro:fetch,oro:http,oro:https,oro:net,oro:dns,oro:tcp,oro:tls - Security and identity —
oro:secure-storage,oro:crypto,oro:cookies,oro:did - Device and host integration —
oro:usb,oro:hci,oro:dbus,oro:xpc,oro:extension - Data and formats —
oro:url,oro:querystring,oro:buffer,oro:stream,oro:sqlite,oro:toml,oro:semver - Background work and automation —
oro:worker,oro:worker_threads,oro:service-worker,oro:shared-worker,oro:background,oro:mcp,oro:ai
Native services in Runtime 0.2#
Use native platform services to check backend support before enabling an operation:
oro:platformdiscovers compiled backends; it does not grant permission or prove runtime availability.oro:authenticationandoro:credentialsseparate cryptographic key operations from explicit password-provider selection.oro:foreground,oro:background/deferred, andoro:pushprovide registered native execution and transport on Android/Linux, with feature-specific admission and lifetime limits.oro:workflowsandoro:migrationexpose Android-only high-level executors. Shared storage or lower-level Linux services do not make these executors available on other platforms.oro:launcher,oro:document-access,oro:network-status, andoro:hapticscover destinations, Android provider grants, Android/Linux network paths, and optional Android feedback.oro:window/appearanceandoro:window/backextend the window reference with insets, gestures, and bounded native Back handling. Diagnostics add compiled capabilities and Android build identity without exporting private correlation data.
See Runtime 0.2 releases for upgrade steps and editor tooling for the matching CLI/server models.
Importing oro:* modules#
Modules are standard ES modules:
import application from 'oro:application'
import { onReady } from 'oro:hooks'
import * as secureStorage from 'oro:secure-storage'
If you need an exhaustive list of every oro:* specifier (including subpaths), see: All module specifiers.
Runtime boundary#
Most application code does not need a special runtime-detection branch. Import
the oro:* modules you actually use and treat those imports as the explicit
native-capability boundary.
Configuration in JavaScript#
oro:application exposes the effective application configuration as application.config.
Config keys are flattened (for example meta_bundle_identifier, build_output) rather than nested tables.
import application from 'oro:application'
console.log(application.config.meta_bundle_identifier)
console.log(application.runtimeVersion)
If you’re looking for the TOML keys and defaults, see: Configuration.
Next#
- Core modules:
oro:application·oro:window·oro:hooks - OS + data:
oro:fs·oro:path·oro:process·oro:url - Networking:
oro:fetch·oro:http·oro:https·oro:tls - Devices + services:
oro:usb·oro:dbus·oro:xpc·oro:extension - Services:
oro:mcp·oro:ai·oro:notification·oro:secure-storage
Source repository · Edit this page · View Markdown