Re: ClojureScript children seq

2011-09-10 Thread Max Penet
On Sep 10, 9:33 pm, Max Penet wrote: > You can use goog.dom/getChildren to get the children (I think it will > exclude the non-Nodes such as text and comments) I meant "non Element Nodes" -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to

Re: ClojureScript children seq

2011-09-10 Thread Max Penet
You can use goog.dom/getChildren to get the children (I think it will exclude the non-Nodes such as text and comments ) but it will return an HTMLCollection doesn t implement ISeq, so you need to transform it to a regular js array with goog.array/toArray. something along these lines: (ns dom-mani

ClojureScript children seq

2011-09-10 Thread Timothy Baldridge
I'm trying to do something like this in ClojureScript: (classes/add (nth (children (dom/getElement "topbar")) idx) "selected")) However I'm not sure what "children" should be. I tried (.children but that doesn't seem to work with nth. So I guess, in genera