diff --git a/clog-document.lisp b/clog-document.lisp
index bbe9a71..cce3ec5 100644
--- a/clog-document.lisp
+++ b/clog-document.lisp
@@ -126,14 +126,14 @@ clog-documentation object. (Private)"))
(execute obj (format nil "title='~A'" (cc:escape-string value))))
(defsetf title set-title)
-;;;;;;;;;
-;; url ;;
-;;;;;;;;;
+;;;;;;;;;;;;;;;;;;
+;; document-url ;;
+;;;;;;;;;;;;;;;;;;
-(defgeneric url (clog-document)
+(defgeneric document-url (clog-document)
(:documentation "Get url."))
-(defmethod url ((obj clog-document))
+(defmethod document-url ((obj clog-document))
(query obj "url"))
;;;;;;;;;;;;;;;;;
diff --git a/clog-element.lisp b/clog-element.lisp
index c75c405..eeb6472 100644
--- a/clog-element.lisp
+++ b/clog-element.lisp
@@ -217,24 +217,24 @@ used for body and image maps."))
(setf (property obj "title") value))
(defsetf advisory-title set-advisory-title)
-;;;;;;;;;;;;;;;;
-;; class-name ;;
-;;;;;;;;;;;;;;;;
+;;;;;;;;;;;;;;;;;;;;
+;; css-class-name ;;
+;;;;;;;;;;;;;;;;;;;;
-(defgeneric class-name (clog-element)
- (:documentation "Get/Setf class-name. CSS Class name, can be multiple
+(defgeneric css-class-name (clog-element)
+ (:documentation "Get/Setf css-class-name. CSS Class name, can be multiple
seperated by . See add-class, remove-class and toggle-class methods
for adding and removing individual or groups of classes in an easier way."))
-(defmethod class-name ((obj clog-element))
+(defmethod css-class-name ((obj clog-element))
(property obj "className"))
-(defgeneric set-class-name (clog-element value)
- (:documentation "Set class-name VALUE for CLOG-ELEMENT"))
+(defgeneric set-css-class-name (clog-element value)
+ (:documentation "Set css-class-name VALUE for CLOG-ELEMENT"))
-(defmethod set-class-name ((obj clog-element) value)
+(defmethod set-css-class-name ((obj clog-element) value)
(setf (property obj "className") value))
-(defsetf class-name set-class-name)
+(defsetf css-class-name set-css-class-name)
;;;;;;;;;;;;;;;
;; editablep ;;
@@ -1547,34 +1547,34 @@ A list of standard cursor types can be found at:
;; add-class ;;
;;;;;;;;;;;;;;;
-(defgeneric add-class (clog-element class-name)
+(defgeneric add-class (clog-element css-class-name)
(:documentation "add-class."))
-(defmethod add-class ((obj clog-element) class-name)
+(defmethod add-class ((obj clog-element) css-class-name)
(jquery-execute obj (format nil "addClass('~A')"
- (escape-string class-name))))
+ (escape-string css-class-name))))
;;;;;;;;;;;;;;;;;;
;; remove-class ;;
;;;;;;;;;;;;;;;;;;
-(defgeneric remove-class (clog-element class-name)
+(defgeneric remove-class (clog-element css-class-name)
(:documentation "remove-class."))
-(defmethod remove-class ((obj clog-element) class-name)
+(defmethod remove-class ((obj clog-element) css-class-name)
(jquery-execute obj (format nil "removeClass('~A')"
- (escape-string class-name))))
+ (escape-string css-class-name))))
;;;;;;;;;;;;;;;;;;
;; toggle-class ;;
;;;;;;;;;;;;;;;;;;
-(defgeneric toggle-class (clog-element class-name)
+(defgeneric toggle-class (clog-element css-class-name)
(:documentation "toggle-class."))
-(defmethod toggle-class ((obj clog-element) class-name)
+(defmethod toggle-class ((obj clog-element) css-class-name)
(jquery-execute obj (format nil "toggleClass('~A')"
- (escape-string class-name))))
+ (escape-string css-class-name))))
;;;;;;;;;;;;;;;;;;;;;
;; remove-from-dom ;;
diff --git a/clog-window.lisp b/clog-window.lisp
index fed207e..848a199 100644
--- a/clog-window.lisp
+++ b/clog-window.lisp
@@ -38,7 +38,7 @@ window."))
(defgeneric set-window-name (clog-window value))
(defmethod set-window-name ((obj clog-window) value)
- (execute obj "name" (escape-string value)))
+ (execute obj (format nil "name='~A'" (escape-string value))))
(defsetf window-name set-window-name)
;;;;;;;;;;;;;;;;
@@ -54,7 +54,7 @@ window."))
(defgeneric set-status-bar (clog-window value))
(defmethod set-status-bar ((obj clog-window) value)
- (execute obj "status" (escape-string value)))
+ (execute obj (format nil "status='~A'" (escape-string value))))
(defsetf status-bar set-status-bar)
;;;;;;;;;;;;;;;;;;
@@ -70,7 +70,7 @@ window."))
(defgeneric set-inner-height (clog-window value))
(defmethod set-inner-height ((obj clog-window) value)
- (execute obj "innerHeight" value))
+ (execute obj (format nil "innerHeight='~A'" (escape-string value))))
(defsetf inner-height set-inner-height)
;;;;;;;;;;;;;;;;;
@@ -86,7 +86,7 @@ window."))
(defgeneric set-inner-width (clog-window value))
(defmethod set-inner-width ((obj clog-window) value)
- (execute obj "innerWidth" value))
+ (execute obj (format nil "innerWidth='~A'" (escape-string value))))
(defsetf inner-width set-inner-width)
;;;;;;;;;;;;;;;;;;
@@ -102,7 +102,7 @@ window."))
(defgeneric set-outer-height (clog-window value))
(defmethod set-outer-height ((obj clog-window) value)
- (execute obj "outerHeight" value))
+ (execute obj (format nil "outerHeight='~A'" (escape-string value))))
(defsetf outer-height set-outer-height)
;;;;;;;;;;;;;;;;;
@@ -118,7 +118,7 @@ window."))
(defgeneric set-outer-width (clog-window value))
(defmethod set-outer-width ((obj clog-window) value)
- (execute obj "outerWidth" value))
+ (execute obj (format nil "outerWidth='~A'" (escape-string value))))
(defsetf outer-width set-outer-width)
;;;;;;;;;;;;;;
@@ -134,7 +134,7 @@ window."))
(defgeneric set-x-offset (clog-window value))
(defmethod set-x-offset ((obj clog-window) value)
- (execute obj "pageXOffset" value))
+ (execute obj (format nil "pageXOffset='~A'" (escape-string value))))
(defsetf x-offset set-x-offset)
;;;;;;;;;;;;;;
@@ -150,7 +150,7 @@ window."))
(defgeneric set-y-offset (clog-window value))
(defmethod set-y-offset ((obj clog-window) value)
- (execute obj "pageYOffset" value))
+ (execute obj (format nil "pageYOffset='~A'" (escape-string value))))
(defsetf y-offset set-y-offset)
;;;;;;;;;
@@ -166,7 +166,7 @@ window."))
(defgeneric set-top (clog-window value))
(defmethod set-top ((obj clog-window) value)
- (exectue obj "screenY" value))
+ (execute obj (format nil "screenY='~A'" (escape-string value))))
(defsetf top set-top)
;;;;;;;;;;
@@ -182,7 +182,7 @@ window."))
(defgeneric set-left (clog-window value))
(defmethod set-left ((obj clog-window) value)
- (execute obj "screenX" value))
+ (execute obj (format nil "screenX='~A'" (escape-string value))))
(defsetf left set-x-offset)
;;;;;;;;;;;;;;;;;
@@ -494,17 +494,3 @@ ON-STORAGE-HANDLER is nil unbind the event."))
(funcall on-storage obj (parse-storage-event data)))
:call-back-script storage-event-script)))
-;;;;;;;;;;;;;;;;;;;
-;; Set-on-resize ;;
-;;;;;;;;;;;;;;;;;;;
-
-(defgeneric set-on-resize (clog-window on-resize-handler)
- (:documentation "Set the ON-RESIZE-HANDLER for CLOG-OBJ. If ON-RESIZE-HANDLER
-is nil unbind the event."))
-
-(defmethod set-on-resize ((obj clog-window) on-resize-handler)
- (let ((on-resize on-resize-handler))
- (set-event obj "resize"
- (lambda (data)
- (declare (ignore data))
- (funcall on-resize obj)))))
diff --git a/clog.lisp b/clog.lisp
index 3488b61..6ec3b21 100644
--- a/clog.lisp
+++ b/clog.lisp
@@ -283,7 +283,6 @@ application."
(set-on-hash-change generic-function)
(set-on-orientation-change generic-function)
(set-on-storage generic-function)
- (set-on-resize generic-function)
(move-by generic-function)
(move-to generic-function)
(resize-by generic-function)
@@ -298,7 +297,7 @@ application."
(last-modified generic-function)
(referer generic-function)
(title generic-function)
- (url generic-function)
+ (document-url generic-function)
(head-element generic-function)
(body-element generic-function)
(document-element generic-function)
diff --git a/doc/clog-manual.html b/doc/clog-manual.html
index e95ee01..7c88f1b 100644
--- a/doc/clog-manual.html
+++ b/doc/clog-manual.html
@@ -78,11 +78,12 @@ application.
-[function] INITIALIZE ON-NEW-WINDOW-HANDLER &KEY (HOST "0.0.0.0") (PORT 8080) (BOOT-FILE "/boot.html") (STATIC-ROOT #P"static-files/")
+[function] INITIALIZE ON-NEW-WINDOW-HANDLER &KEY (HOST "0.0.0.0") (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
the default route to establish web-socket connections and static files
-located at STATIC-ROOT.
+located at STATIC-ROOT. If CLOG was already initialized and not shut
+down, this function does the same as set-on-new-window.
@@ -215,6 +216,14 @@ are stored in this string based hash in the format of:
"html-id:event-name" => event-handler.
+
+
+
+
@@ -228,9 +237,9 @@ are stored in this string based hash in the format of:
-[generic-function] SET-ON-RESIZE CLOG-WINDOW ON-RESIZE-HANDLER
+[generic-function] SET-ON-RESIZE CLOG-OBJ ON-RESIZE-HANDLER
-Set the ON-RESIZE-HANDLER for CLOG-OBJ. If ON-RESIZE-HANDLER
+
Set the ON-RESIZE-HANDLER for CLOG-OBJ. If ON-RESIZE-HANDLER
is nil unbind the event.
@@ -637,11 +646,7 @@ used for body and image maps.
-[generic-function] CLASS-NAME CLOG-ELEMENT
-
-Get/Setf class-name. CSS Class name, can be multiple
-seperated by . See add-class, remove-class and toggle-class methods
-for adding and removing individual or groups of classes in an easier way.
+- [generic-function] CLASS-NAME CLASS
@@ -1454,7 +1459,7 @@ A list of standard cursor types can be found at:
@@ -1462,7 +1467,7 @@ A list of standard cursor types can be found at:
@@ -1470,7 +1475,7 @@ A list of standard cursor types can be found at:
@@ -1841,15 +1846,6 @@ If ON-ORIENTATION-CHANGE-HANDLER is nil unbind the event.
ON-STORAGE-HANDLER is nil unbind the event.
-
-
-
-
@@ -1938,12 +1934,12 @@ is nil unbind the event.
Get/setf title.
-
+
@@ -1957,7 +1953,7 @@ is nil unbind the event.
diff --git a/tutorial/01-tutorial.lisp b/tutorial/01-tutorial.lisp
index d41e6cd..b923311 100644
--- a/tutorial/01-tutorial.lisp
+++ b/tutorial/01-tutorial.lisp
@@ -22,6 +22,7 @@
(set-on-click hello-element ; Now we set a function to handle clicks
(lambda (obj) ; In this case we use an anonymous function
+ (declare (ignore obj))
(setf (color hello-element) "green")))))
;; To see all the events one can set and the many properties and styles that
;; exist, take a look through the CLOG manual or the file clog-element.lisp
diff --git a/tutorial/02-tutorial.lisp b/tutorial/02-tutorial.lisp
index 52ad1ab..ddef493 100644
--- a/tutorial/02-tutorial.lisp
+++ b/tutorial/02-tutorial.lisp
@@ -22,6 +22,7 @@
(let ((x 0)) ; A closure - each call to on-new-window will
(set-on-click hello-element ; create a different version of this closer.
(lambda (obj)
+ (declare (ignore obj))
(incf x)
(dotimes (n x)
(create-child body
diff --git a/tutorial/03-tutorial.lisp b/tutorial/03-tutorial.lisp
index 71a7e44..f87a4fb 100644
--- a/tutorial/03-tutorial.lisp
+++ b/tutorial/03-tutorial.lisp
@@ -15,6 +15,7 @@
(let ((x 0))
(set-on-click hello-element
(lambda (obj)
+ (declare (ignore obj))
(incf x)
(dotimes (n x)
(create-child body