function | since v0.0-927 | Edit |
(replace-node old-node new-node)
Replace old-node with new-node. old-node can be an element or a keyword which is the id of the node to replace. new-node can be an element or an html string.
(defn replace-node
[old-node new-node]
(let [old-node (ensure-element old-node)
new-node (ensure-element new-node)]
(gdom/replaceNode new-node old-node)
new-node))