IFClite TypeScript API
    Preparing search index...

    Interface RuntimeSandboxHandle

    A live sandbox handle the runtime hands back to callers. The exact implementation lives in the host (browser viewer wraps QuickJS; tests use the in-memory stub).

    interface RuntimeSandboxHandle {
        isDisposed?: boolean;
        dispose(): void | Promise<void>;
        run(source: string, options?: RuntimeRunOptions): Promise<RuntimeRunResult>;
        setGlobal(name: string, value: unknown): void | Promise<void>;
    }
    Index
    isDisposed?: boolean

    Optional liveness flag. When the host's sandbox implementation can detect that its underlying realm was torn down (QuickJS context disposed, WASM aborted), it exposes true here so the runtime can drop a stale activation record and rebuild instead of handing back a dead handle. Implementations that can't tell may omit it — the runtime treats undefined as "assume alive".

    • Dispose the underlying sandbox and free its resources.

      Returns void | Promise<void>

    • Evaluate the given source inside the sandbox. The runtime expects sources that have already been wrapped by wrapEntrySource; the __ifclite_ctx__ global must be available inside the realm.

      Parameters

      Returns Promise<RuntimeRunResult>

    • Install a value as a global inside the sandbox. Called by the runtime to install __ifclite_ctx__ before each run. The host implementation marshals the value across the realm boundary.

      Parameters

      • name: string
      • value: unknown

      Returns void | Promise<void>