Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在一个元素的所有子元素上调用“map”,但 goog.dom/getChildren 并不总是返回一个可以排序的对象。有没有其他方法可以做到这一点?
我会goog.dom/getChildren结合prim-seq. prim-seq用 JavaScript 对象制作 seqs,这些对象可以像数组一样被索引并具有length属性。在这种特殊情况下,我会单独扩展本机类型。
goog.dom/getChildren
prim-seq
length