(defpackage #:clog-user ; Setup a package for our work to exist in (:use #:cl #:clog) ; Use the Common Lisp language and CLOG (:export start-tutorial)) ; Export as public the start-tutorial function (in-package :clog-user) ; Tell the "reader" we are in the clog-user package ;; Define our CLOG application (defun on-new-window (body) ; Define the function called on-new-window "On-new-window handler." ; Optional docstring to describe function (let ((hello-element ; hello-element is a local variable that ; will be bound to our new CLOG-Element ;; This application simply creates a CLOG-Element as a child to the ;; CLOG-body object in the browser window. ;; A CLOG-Element represents a block of HTML (we will see later ways to ;; directly create buttons and all sorts of HTML elements in more lisp ;; like ways with no knowledge of HTML or javascript. CREATE-CHILD ;; allows any html element to be created and returned as a CLOG-Element. (create-child body "