diff --git a/clog-element-common.lisp b/clog-element-common.lisp index 9e27379..3b2e1a9 100644 --- a/clog-element-common.lisp +++ b/clog-element-common.lisp @@ -448,12 +448,12 @@ CLOG-OBJ")) ;; create-span ;; ;;;;;;;;;;;;;;;;; -(defgeneric create-span (clog-obj content &key auto-place) +(defgeneric create-span (clog-obj &key content auto-place) (:documentation "Create a new CLOG-Span as child of CLOG-OBJ with CONTENT and if :AUTO-PLACE (default t) place-inside-bottom-of CLOG-OBJ")) -(defmethod create-span ((obj clog-obj) content &key (auto-place t)) +(defmethod create-span ((obj clog-obj) &key (content "") (auto-place t)) (create-child obj (format nil "~A" (escape-string content)) :clog-type 'clog-span :auto-place auto-place)) diff --git a/clog-element.lisp b/clog-element.lisp index e92b15c..2459577 100644 --- a/clog-element.lisp +++ b/clog-element.lisp @@ -295,14 +295,14 @@ not relevant not just visually and will _also_ remove it from layout similar to setting display (None).")) (defmethod hiddenp ((obj clog-element)) - (js-true-p (property obj "hidden"))) + (js-true-p (attribute obj "hidden"))) (defgeneric set-hiddenp (clog-element value) (:documentation "Set hiddenp VALUE for CLOG-ELEMENT")) (defmethod set-hiddenp ((obj clog-element) value) (if value - (setf (property obj "hidden") t) + (setf (attribute obj "hidden") t) (remove-attribute obj "hidden"))) (defsetf hiddenp set-hiddenp) diff --git a/clog-system.lisp b/clog-system.lisp index 426b4d5..2c1cfcf 100644 --- a/clog-system.lisp +++ b/clog-system.lisp @@ -31,7 +31,7 @@ (port 8080) (boot-file "/boot.html") (static-root #P"./static-files/")) - "Inititalze CLOG on a socket using HOST and PORT to serve BOOT-FILE as + "Inititalize CLOG on a socket using HOST and PORT to serve BOOT-FILE as the default route to establish web-socket connections and static files located at STATIC-ROOT. If CLOG was already initialized and not shut down, this function does the same as set-on-new-window." diff --git a/tutorial/09-tutorial.lisp b/tutorial/09-tutorial.lisp index 2dff6d9..f912be4 100644 --- a/tutorial/09-tutorial.lisp +++ b/tutorial/09-tutorial.lisp @@ -84,7 +84,8 @@ (setf (title (html-document body)) (value fe1)) (setf (background-color p1) (value fe2)) (setf (hiddenp f1) t) - (create-span p1 "
Your form has been submitted"))) + (create-span p1 :content + "
Your form has been submitted"))) (setf (width p1) "100%") (setf (width p2) "100%") @@ -126,7 +127,7 @@ (set-on-submit f2 (lambda (obj) (setf (hiddenp f2) t) - (create-span p2 + (create-span p2 :content (format nil "
Your form has been submitted:
~A
1 - ~A
2 - ~A
3 - ~A" (value ta1)