(defpackage #:test-clog (:use #:cl #:clog) (:export test)) (in-package :test-clog) (defvar *last-obj*) (defun on-new-window (win) (let ((tmp)) (clog-connection:put-line (clog::connection-id win) "") (setf tmp (attach-as-child win "myid")) (setf (style tmp "background-color") "red") (setf (property tmp "draggable") "true") (when (equal (property tmp "draggable") (setf (property tmp "innerHTML") "

I am draggable

"))) (setf tmp (create-child win "")) (set-on-mouse-enter *last-obj* (lambda () (setf (property *last-obj* "innerHTML") "Inside"))) (set-on-mouse-leave *last-obj* (lambda () (setf (property *last-obj* "innerHTML") "Outside"))) (set-on-mouse-click *last-obj* (lambda (data) (print data))) (set-on-mouse-move *last-obj* (lambda (data) (format t "x=~A Y=~A~%" (getf data ':x) (getf data ':y)))) (set-on-character win (lambda (data) (print data))) )) (defun test () (print "Init connection") (initialize #'on-new-window :boot-file "/debug.html") (print "Open browser") (open-browser))