electron-agent-bridge
    Preparing search index...

    CDP over one page's DevTools WebSocket (ws://host:port/devtools/page/<id>), for Attach mode. One socket per page, so the engine sees no session ids of its own; child sessions (auto-attached frames and workers) carry theirs as usual. When the socket closes, the page is detached for good: a page that comes back is a new target.

    Implements

    Index
    kind: "websocket" = ...
    • get detachedReason(): | "unknown"
      | "host-debugger"
      | "target-closed"
      | "crashed"
      | "closed"
      | undefined

      Why the transport is detached; undefined while attached.

      Returns "unknown" | "host-debugger" | "target-closed" | "crashed" | "closed" | undefined

    • Parameters

      • listener: (
            reason:
                | "unknown"
                | "host-debugger"
                | "target-closed"
                | "crashed"
                | "closed",
        ) => void

      Returns Disposable

    post

    • post(method: string, params?: object, sessionId?: string): void

      Send a command without awaiting it. Required before a page's first navigation, where commands may not resolve until navigation starts (ADR-0002). Failures are swallowed.

      Parameters

      • method: string
      • Optionalparams: object
      • OptionalsessionId: string

      Returns void

    • Send a command and await its result. Rejects with a BridgeError.

      Parameters

      • method: string
      • Optionalparams: object
      • OptionalsessionId: string

      Returns Promise<unknown>