Jonas Anseeuw
Jonas Anseeuw

Reputation: 3650

Page doesn't render extended Polymer element

I am trying to extend the Polymer core-selector but it doesn't render on the webpage. When I place <shadow></shadow> inside the template-tags it does render.

I don't know for sure if that is the real problem. What is the purpose of the shadow-tags? I don't find information about that in the API documentation.

Here is the link to an example: http://jsbin.com/qucitiwe/3/edit?html,console

Upvotes: 0

Views: 159

Answers (1)

Dirk Grappendorf
Dirk Grappendorf

Reputation: 3422

You can find some information on how to extend elements in the Extending other elements section of the Polymer documentation.

The shadow element renders the shadow DOM of the parent element (the DOM inside the parent's template element) at this exact location. So without the shadow element you won't see any DOM from the parent element.

In addition, a child element can wrap the parent's shadow DOM with its own content, for example:

<template>
  <div>Title</div>
  <shadow></shadow>
  <div>Footer</div>
</template>

Upvotes: 4

Related Questions