Nested polymer template inheritance

Anthony Bobenrieth

Is there any way to surround a polymer child template with its parent's template?

In the following example shadow tag bring the parent's template into the child view, but it's ignoring its content:

Parent polymer element

<polymer-element name="my-window">
  <template>
    <div class="windowframe">
      <p>test</p> <!-- can be shown with shadow tag -->
      <content></content> <!-- cannot be used with shadow tag -->

Child polymer element

<polymer-element name="my-window-example" extends="my-window">
  <template>
    <!-- get the hosts' shadow and insert here -->
    <shadow>
       <p>Here is the content of my window<p> <!--won't be shown -->
    </shadow>
  </template>
CletusW

This used to be possible in Chrome Canary (see this blog post, this discussion, the fixed spec bug, and the fixed Chromium bug), but unfortunately it doesn't seem to be working for me anymore in Chrome 33.0.1750.22 dev on Linux or Chrome 34.0.1809.0 canary on Windows with the "Enable experimental Web Platform features" flag on or off. Try this jsbin to see if it works for you.

Update: Confirmed. This feature was removed from the initial implementation of Shadow DOM in Chrome due to "implementation concerns."

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Polymer custom element property not accessible in nested template

From Dev

Polymer Access Element Inside of Nested Template by Id

From Dev

Template repeat not working for nested list (Polymer.dart)

From Dev

Using querySelector to find nested elements inside a Polymer template returns null

From Dev

Template repeat not working for nested list (Polymer.dart)

From Dev

Should I prefer to call template metafunctions through a nested typedef or inheritance?

From Dev

Should I prefer to call template metafunctions through a nested typedef or inheritance?

From Dev

Template and inheritance

From Dev

Polymer inheritance, parent methods undefined

From Dev

Polymer - Conditional Template

From Dev

Dart Polymer conditional template

From Dev

Polymer - dynamic template rendering

From Dev

Polymer template repeat not working

From Dev

polymer repeat template "refresh"

From Dev

Polymer recursive template binding

From Dev

Polymer - dynamic template rendering

From Dev

Updating a polymer element template

From Dev

Accessing a nested polymer element

From Dev

Nested templates in Polymer

From Dev

Nested templates in Polymer

From Dev

clone of polymer element remove template of polymer element

From Dev

template member function inheritance

From Dev

C++ Template Inheritance

From Dev

template inheritance and abstract class

From Dev

Inheritance with possible template failure

From Dev

flask Template Inheritance tutorial

From Dev

Template class arguments inheritance

From Dev

Vuejs template inheritance

From Dev

Inheritance with possible template failure