IFClite TypeScript API
    Preparing search index...

    Class ExtensionRuntime

    Index
    • Activate an extension. Creates a sandbox, derives permissions from the granted capabilities, installs the __ifclite_ctx__ global, and runs entry.activate if the bundle declares one. Idempotent — if the extension is already active, returns the existing record.

      The activate call is fire-and-forget for async returns: the activation record's activateResult.value may be a Promise the sandbox is still resolving. The runtime never awaits async user work because long-running activation would block the host.

      Parameters

      Returns Promise<ActivationRecord>

    • Deactivate an extension. Disposes the underlying sandbox. No-op for unknown ids.

      If an activate() for the same id is still in flight, we await it first — otherwise the activation would resolve after this call, active.set a fresh record, and leak an untracked QuickJS context the host believes is gone.

      Parameters

      • extensionId: string

      Returns Promise<void>

    • Run the extension's entry.deactivate script (if any) and dispose the sandbox. No-op for unknown ids.

      Parameters

      • extensionId: string
      • bundle: Bundle

      Returns Promise<void>

    • Dispose every active extension. Used on flavor switch / shutdown.

      Returns Promise<void>

    • Snapshot of the current activation record, if any.

      Parameters

      • extensionId: string

      Returns ActivationRecord | undefined

    • True iff the extension has an active sandbox.

      Parameters

      • extensionId: string

      Returns boolean

    • All active extension ids.

      Returns string[]