You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation has a lot of examples of polymer-elements with attributes, but aside from mentioning that child elements are possible at http://www.html5rocks.com/en/tutorials/webcomponents/customelements/, I don't see anything about how to use the templating engine to generate different shadow-dom based on the child elements of the polymer-element.
The simplest way to control what is rendered in a shadowRoot via templating is to use <template if>.
Note that a shadowRoot is generated for each element form which the element extends. To customize this behavior and control what's stamped into the element's shadowRoot, you can implement parseDeclarations and call this.shadowFromTemplate(template).
The documentation has a lot of examples of
polymer-element
s with attributes, but aside from mentioning that child elements are possible at http://www.html5rocks.com/en/tutorials/webcomponents/customelements/, I don't see anything about how to use the templating engine to generate different shadow-dom based on the child elements of thepolymer-element
.For example, maybe I want to implement the
dateRangePicker
from http://www.html5rocks.com/en/tutorials/webcomponents/shadowdom/#toc-projection. Or maybe I want to generate a shadow-table
whose rows depend on which child elements are present, but then use<content select>
to attach those child elements.The text was updated successfully, but these errors were encountered: