문제

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?

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top