Unfortunately not. This is because of the way the poly-list should work. I
don't want to have the end user need to setup an on-click handler. The user
defines their content to be repeated where poly-list is implemented, not
defined. As shown in my example in the initial post. A simplified version
is shown below:
<poly-list data="{{ data.in }}">
<template>
<div> <!-- on-click on this element without user defining it -->
<span>Repeated content</span>
</div>
</template>
On Monday, August 25, 2014 6:31:19 PM UTC-7, Rob Dodson wrote:
>
> Can you leverage the declarative event bindings in your repeating template
> like so: http://jsbin.com/hejiwu/2/edit
>
>
> On Mon, Aug 25, 2014 at 6:17 PM, <[email protected] <javascript:>> wrote:
>
>> Is it possible to get the elements that will be/were rendered from a
>> <template
>> repeat>?
>>
>> I have a component called poly-list, implemented below:
>> <poly-list dataList="{{ data.in }}" id="inList"
>> style="overflow: hidden; min-width: 324px;
>> display: inline-block;">
>> <template>
>> <div on-click="{{ testClick }}">
>> <paper-input-no-error value="{{ [0] }}"
>> class="in-paper-input"
>> on-change="{{ inChanged
>> }}" id="0"></paper-input-no-error>
>>
>> <paper-input-no-error value="{{ [1] }}"
>> class="in-paper-input"
>> placeholder="Value"
>> id="1"></paper-input-no-error>
>> </div>
>> </template>
>> </poly-list>
>>
>>
>>
>> I then activate the template in the domReady callback:
>>
>> this.template.model = this.data;
>> this.template.setAttribute('repeat', '');
>>
>>
>> I need a way to get each individual element that the template will put
>> into the DOM. I need to do this in order to add an event listener to each
>> component that is rendered. I also want this to be encapsulated in my
>> poly-list components so components implementing poly-list will not need to
>> setup the event itself.
>>
>> Is there an event that will return each element as it is rendered or
>> something similar?
>>
>> Follow Polymer on Google+: plus.google.com/107187849809354688692
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Polymer" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/polymer-dev/74312825-9322-4cec-ab52-8fe34b0ddbbf%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/polymer-dev/74312825-9322-4cec-ab52-8fe34b0ddbbf%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/polymer-dev/7e670008-0872-488e-83a5-5e007ec6ea09%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.