javascript - polymer how to get children of the same type -
i still experimenting how far can go building widget in polymer , stuck in 1 place. want create element children polymer elements. like:
<my-view name="hello"> <my-child-view attribute="test">test</my-child-view> <my-child-view attribute="test1">test2</my-child-view> <my-child-view attribute="test2">test3</my-child-view> <my-child-view attribute="test3"></my-child-view> <my-other-child-view var="test5"></my-other-child-view> </my-view>
i want children tag name "my-child-view". using this.children
takes children. there native polymer functionality this.getchildrenwithquery('my-child-view')
? or should loop through children , check ones tag name myself?
this.queryselectorall('my-child-view')
native js dom! yes, queryselectorall()
works on elements document.
Comments
Post a Comment