Support target object on events

This commit is contained in:
David Botton 2021-01-06 13:17:21 -05:00
parent f897486c81
commit 34971a7c90
10 changed files with 119 additions and 50 deletions

View file

@ -7,14 +7,14 @@
(defun on-new-window (body)
"On-new-window handler."
(setf (title (html-document body)) "Tutorial 2")
(setf (title (html-document body)) "Tutorial 3")
(let ((hello-element
(create-child body "<h1>Hello World! (click me!)</h1>")))
(let ((x 0))
(set-on-click hello-element
(lambda ()
(lambda (obj)
(incf x)
(dotimes (n x)
(create-child body