RunScript runs on the game thread; other threads queue it. JS errors appear in
Panorama’s console. Invalid or unavailable panels raise Lua errors.
nil if no panel matches. For duplicate IDs, pass a root to select the tree.
Bridge
return for results. The local JS bridge provides
the helpers below. Execution and callbacks run asynchronously on the game thread.
- Values: strings, booleans, finite numbers, plain objects and dense arrays. Arrays become one-based Lua tables; empty objects and arrays both become empty tables.
- JS
nullbecomesjson.null; top-levelundefinedbecomesnil. Keep XUIDs as strings. - Unsupported values, including functions, Promises, cycles and nested
undefined, return serialization errors. Promises are not awaited. - Failures call
callback(nil, err)witherr.code,err.messageand, when available,err.stack. Invalid submissions raise Lua errors. - Requests time out after five seconds. Source limit: 32 KiB; encoded message limit: 64 KiB. Use
\u0000instead of literal NUL bytes in source. - Event names are local to each bridge: 1–128 printable ASCII characters.
- Close or script unload cancels bridge listeners, schedules and pending callbacks. Direct Panorama registrations require your own cleanup.
- Create bridges with explicit panels on the game thread. Recreate the bridge if its panel or context is destroyed.