clj-chrome-devtools.impl.connection

The remote debugging WebSocket connection

connect

(connect)(connect host port)(connect host port max-wait-time-ms)(connect host port max-wait-time-ms ws-builder-options)

Establish a websocket connection to the DevTools protocol at host:port. Selects the first inspectable page returned; to attach to a specific page, see connect-url. Initial connection will be retried for up to max-wait-time-ms milliseconds (default 1000) before giving up.

connect-url

(connect-url web-socket-debugger-url & [ws-builder-opts])

Establish a websocket connection to web-socket-debugger-url, as given by inspectable-pages.

connection?

(connection? c)

current-connection

get-current-connection

(get-current-connection)

inspectable-pages

(inspectable-pages host port)(inspectable-pages host port max-wait-time-ms)

Collect the list of inspectable pages returned by the DevTools protocol.

listen

(listen connection domain event callback)

Listen to an event in the specific domain. Invokes callback when an event is received.

Returns a 0-arity function that will remove the listener when invoked.

send-command

(send-command connection payload id)

Send command synchronously. Blocks until result is done and returns it.

send-command-async

(send-command-async {requests :requests, con :ws-connection} payload id)

Send command and return a promise for its result.

unlisten

(unlisten connection domain event callback)