aboutsummaryrefslogtreecommitdiffstats
path: root/l/src/main.lisp
blob: d78f0276cb95b355e96c85501b57c77417d876df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
(in-package :extreload)

(defvar *client* (wsd:make-client "ws://127.0.0.1:55755/devtools/browser/93f390a0-8ba9-4469-8e2d-69c9feb171bc"))

(defun main ()
  (wsd:start-connection *client*)

  (wsd:on :message *client*
          (lambda (message)
            (format t "~&Got: ~A~%" message)))

  (wsd:send *client* (get-targets-msg 1))

  (sleep 1)

  (wsd:close-connection *client*))

(defun get-targets-msg (call-id)
  (jsown:to-json
    `(:obj ("id" . ,call-id)
           ("method" . "Target.getTargets"))))