Hi Leandro,

This kind of question is probably best asked over on stack overflow
<http://stackoverflow.com/>, using the polymer tag.

I think this section might provide the pattern you're looking for:

https://www.polymer-project.org/docs/polymer/polymer.html#automatic-node-finding

Cheers,
Arthur


On Tue, Oct 21, 2014 at 11:07 AM, Leandro Cruz <[email protected]>
wrote:

> Hi all,
>
> I have a custom element A which is extended by element B. Problem is that
> the 'this' reference in A points to B, not A, which makes a query in A's
> shadowRoot fail when extended by B.
>
> The attachment index.html provides an example.
> After loading the example, execute the following code in DevTools:
>
> var sub = document.querySelector('sub-object');
> var base = document.querySelector('base-object');
>
> sub.flag = true;
> base.flag = true;
>
> sub.byId('flaged'); // fails because the this.shadowRoot points to sub's,
> not base.
> base.byId('flaged'); // works
>
> Any ideas?
>
> 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/c3d44e16-06c8-4f33-9856-20b7ed0c0fcf%40googlegroups.com
> <https://groups.google.com/d/msgid/polymer-dev/c3d44e16-06c8-4f33-9856-20b7ed0c0fcf%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/CADSbU_zhTMF9TO7%2BRqCs5va7mm%2BUzFZ6oUirtGO39s3vrwfoNA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to