News for hackers. Stuff that matters.
Re:ClojureScript gets a REPL that drives the browser by ibdknox on Thursday July 28, 2011 @04:06PM (#2818673)
Not "cool" per se, but here's something that works :)

    (require '[goog.dom :as dom])
    (def body (aget (dom/getElementsByTagNameAndClass "body") 0))
    (defn elem-factory [tag text] 
        (let [elem (dom/createElement tag)] 
            (dom/setTextContent elem text) 
            elem))
    (dom/appendChild body (elem-factory "p" "my new tag"))

There are no comments on this comment yet.