Pregunta

I want to call "map" over all the children of an element, but goog.dom/getChildren does not always return an object that can be sequenced. Is there any other way to do this?

¿Fue útil?

Solución

I would combine goog.dom/getChildren with prim-seq. prim-seq makes seqs out of JavaScript objects which can be indexed like arrays and have a length property. I would leave extending native types alone in this particular case.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top