Question

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?

Était-ce utile?

La solution

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top