RunJS is the JavaScript execution environment in NocoBase for JS blocks, JS fields, JS actions, and related scenarios. Code runs in a restricted sandbox, safely exposing ctx (context APIs), and provides:
await)await)RunJS supports top-level await, no IIFE required.
Not recommended
Recommended
ctx.importAsync() for ESM modules (recommended)ctx.requireAsync() for UMD/AMD modulesUse ctx.render() to render into the current container (ctx.element). Three supported forms:
windowdocumentnavigatorctx