mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-06 18:50:42 -08:00
22 lines
450 B
Common Lisp
22 lines
450 B
Common Lisp
(defpackage #:clog-user
|
|
(:use #:cl #:clog)
|
|
(:export start-tutorial))
|
|
|
|
(in-package :clog-user)
|
|
|
|
(defun my-on-click (obj)
|
|
(setf (color obj) "green"))
|
|
|
|
(defun on-new-window (body)
|
|
"On-new-window handler."
|
|
|
|
(setf (title (html-document body)) "Tutorial 4")
|
|
|
|
(set-on-click (create-child body "<h1>Hello World! (click me!)</h1>")
|
|
#'my-on-click))
|
|
|
|
(defun start-tutorial ()
|
|
"Start turtorial."
|
|
|
|
(initialize #'on-new-window)
|
|
(open-browser))
|