mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-06 02:30:42 -08:00
bulk traverse dom trees
This commit is contained in:
parent
0287d16884
commit
dbfe0723ce
3 changed files with 123 additions and 106 deletions
|
|
@ -460,20 +460,25 @@ not a temporarily attached one when using select-control."
|
|||
(unless (equalp name "undefined")
|
||||
(setf (attribute content "data-clog-name") name)
|
||||
(destroy data))))
|
||||
(labels ((add-siblings (control)
|
||||
(let (dct)
|
||||
(loop
|
||||
(when (equal (html-id control) "undefined") (return))
|
||||
(let ((dom (list-of-children parent))
|
||||
dct)
|
||||
(labels ((tr (control)
|
||||
(unless (equal (html-id control) "undefined")
|
||||
(setf dct (attribute control "data-clog-type"))
|
||||
(unless (equal dct "undefined")
|
||||
(change-class control (getf (control-info dct) :clog-type))
|
||||
(when (getf (control-info dct) :on-load)
|
||||
(funcall (getf (control-info dct) :on-load) control (control-info dct)))
|
||||
(setup-control content control :win win)
|
||||
(unless (equal dct "block")
|
||||
(add-siblings (first-child control))))
|
||||
(setf control (next-sibling control))))))
|
||||
(add-siblings (first-child parent)))))
|
||||
(change-class control (getf (control-info dct) :clog-type)))
|
||||
(when (getf (control-info dct) :on-load)
|
||||
(funcall (getf (control-info dct) :on-load) control (control-info dct)))
|
||||
(setup-control content control :win win)))
|
||||
(ll (lst)
|
||||
(mapcar (lambda (l)
|
||||
(if (listp l)
|
||||
(if (listp (first l))
|
||||
(tr (first l))
|
||||
(ll l))
|
||||
(tr l)))
|
||||
lst)))
|
||||
(ll dom)))))
|
||||
|
||||
;; Panel Windows
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue