javascript - Accessing a nested polymer element -


Assume that I have defined two custom polymer elements

    

And then in the markup using these elements:

  & lt; Container & gt; & Lt; Child foo = "bar" & gt; & Lt; / Child & gt; & Lt; Child foo = "baz" & gt; & Lt; / Child & gt; & Lt; / Container & gt;   

As I have commented in the code, I want to use methods and / or attributes of the basic elements of the custom element ( not of a template Baby nodes) Naturally, I know that there will be more than just looping through the array, but at the moment I am not completely sure how to use each custom child as their polymer type inevitablyneeded.

I hope this makes sense.

Thank you!

The children at the most safe time to reach the light of an element domReady () In the callback. Can not be created / ready / attached , because the element is not yet guaranteed to upgrade DOM and children.

  • Note: "Container" and "Kids" are not valid custom element names. You need a name "-" somewhere. Therefore "container-element" or "hair-el" will be cured.

  • Comments

    Popular posts from this blog

    Java - Error: no suitable method found for add(int, java.lang.String) -

    java - JPA TypedQuery: Parameter value element did not match expected type -

    c++ - static template member variable has internal linkage but is not defined -