JavaScript APIs / JavaScript APIs overview

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.

How the JavaScript surface is organized#

The runtime’s JavaScript surface is broad, but it stays predictable:

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#

Source repository · Edit this page · View Markdown