mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-06 10:40:45 -08:00
replace-element added
This commit is contained in:
parent
7c2791d4ed
commit
cffbd566da
2 changed files with 12 additions and 0 deletions
|
|
@ -2215,6 +2215,17 @@ on browser."))
|
||||||
(defmethod click ((obj clog-element))
|
(defmethod click ((obj clog-element))
|
||||||
(jquery-execute obj "click()"))
|
(jquery-execute obj "click()"))
|
||||||
|
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;; replace-element ;;
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
|
(defgeneric replace-element (clog-element new-clog-element)
|
||||||
|
(:documentation "CLOG-ELEMENT and its children will we removed from DOM
|
||||||
|
but not destroyed and NEW-CLOG-ELEMENT will replace it in same location.
|
||||||
|
DETROY CLOG-ELEMENT if need to clear from browser memory."))
|
||||||
|
|
||||||
|
(defmethod replace-element ((obj clog-element) (new clog-element))
|
||||||
|
(jquery-execute obj (format nil "replaceWith(~A)" (jquery new))))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;
|
||||||
;; parent-element ;;
|
;; parent-element ;;
|
||||||
|
|
|
||||||
|
|
@ -356,6 +356,7 @@ embedded in a native template application.)"
|
||||||
(remove-from-clog generic-function)
|
(remove-from-clog generic-function)
|
||||||
(destroy generic-function)
|
(destroy generic-function)
|
||||||
(click generic-function)
|
(click generic-function)
|
||||||
|
(replace-element generic-function)
|
||||||
|
|
||||||
"CLOG-Element - DOM Traversal Methods"
|
"CLOG-Element - DOM Traversal Methods"
|
||||||
(parent-element generic-function)
|
(parent-element generic-function)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue