That's sound good.

I re-factored to exclude the content from the base (A) and it feels
slightly faster. At least it's cleaner.

Thanks;)


On Mon, Jul 21, 2014 at 4:09 PM, Rob Dodson <[email protected]> wrote:

> There is a cost associated with creating shadow-roots. Since it sounds
> like A and B share some behavior, but don't share content, it might make
> more sense to factor that behavior into its own base class/element that
> both A and B extend. Or add the behavior using something like
> Platform.mixin (which is unfortunately undocumented, but it basically lets
> you combine prototypes. here's an example
> <https://github.com/PolymerLabs/mock-ajax/blob/master/mock-ajax.html#L5-L12>
> )
>
>
> On Monday, July 21, 2014 3:47:32 PM UTC-7, Xavier Cochard wrote:
>>
>> It doesn't render anything. But I was worried about performances mainly.
>> Also for debugging purpose it would be a bit easier if not there, as not
>> needed for my case.
>>
>> Thanks for the link and explanation.
>>
>> On Monday, July 21, 2014 3:31:45 PM UTC-7, Rob Dodson wrote:
>>>
>>> While the shadow-root from A is present, it shouldn't actually render
>>> anything. It's there in case you want to use the shadow element to
>>> create a shadow insertion point
>>> <http://www.html5rocks.com/en/tutorials/webcomponents/shadowdom-301>.
>>>
>>>
>>> On Sun, Jul 20, 2014 at 6:11 PM, Xavier Cochard <[email protected]>
>>> wrote:
>>>
>>>> Hello,
>>>>
>>>> I am using 2 components A and B, both having a Template and a Script
>>>> tag. Both templates also use conditional template.
>>>> I am confused when extending B by A, that two "#shadow-root" appear
>>>> while inspecting the dom.
>>>>
>>>> <my-element-B ....>
>>>>   |> #shadow-root  (from B)
>>>>   |> #shadow-root  (from A)
>>>> </my-element-B>
>>>>
>>>> Is there a way to only see B such as:
>>>>
>>>> <my-element-B ....>
>>>>   |> #shadow-root  (from B)
>>>> </my-element-B>
>>>>
>>>> In that sense I only want to extends the prototype and fully override
>>>> the Template.
>>>>
>>>> Thanks
>>>> Xavier
>>>>
>>>> (using chrome 36 and latest polymer)
>>>>
>>>>
>>>>  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/22beb6d4-4aea-47e0-903a-4577724eaa31%
>>>> 40googlegroups.com
>>>> <https://groups.google.com/d/msgid/polymer-dev/22beb6d4-4aea-47e0-903a-4577724eaa31%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/CAEOXzOTA8CnWX%3DY5DXnim0A%2Bu%3DaWT5ageVwzV-WgD4prHrsVhA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to