Re: [ClojureScript] My implementation of ISeqable for NodeList doesn't work on Opera.

2012-11-25 Thread Matthew Molloy
Shouldn't that be (.-length nl) ? Matt On Tuesday, January 10, 2012 7:25:29 AM UTC+10, Jozef Wagner wrote: Beware that NodeList is often a live collection, so it is probably a good idea to produce eager seq. I use this to convert it to seq: (defn nodelist-to-seq Converts nodelist to

Re: [ClojureScript] My implementation of ISeqable for NodeList doesn't work on Opera.

2012-01-09 Thread Stuart Sierra
I would like to have NodeList be seqable. Please file a ticket with a patch. Perhaps someone else can shed light on why Opera doesn't work. -S -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: [ClojureScript] My implementation of ISeqable for NodeList doesn't work on Opera.

2012-01-09 Thread Jozef Wagner
Beware that NodeList is often a live collection, so it is probably a good idea to produce eager seq. I use this to convert it to seq: (defn nodelist-to-seq Converts nodelist to (not lazy) seq. [nl] (let [result-seq (map #(.item nl %) (range (.length nl)))] (doall result-seq))) -- You

[ClojureScript] My implementation of ISeqable for NodeList doesn't work on Opera.

2012-01-06 Thread Takahiro Hozumi
Hi, Following code cause an error, because NodeList doesn't extend ISeqable. (doseq [u (goog.dom/getElementsByClass myclass)] ...) Uncaught Error: No protocol method ISeqable.-seq defined for type object: [object NodeList] So I implemented ISeqable for NodeList. (extend-type js/NodeList