How to render shadow DOM in a polymer custom element


I’m having a hard time getting my polymer custom element to render content within a container <div> without the <div> showing up in the light DOM.

<polymer-element name="impress-slide" constructor="ImpressSlide" attributes="exitAnimation entryAnimation">
        <link rel="stylesheet" href="animate-custom.css">
            <style type="text/css">
        <script type="text/javascript">

renders as

     <div> (Content) </div>

Can anyone give me some insight into how I can render the containing <div> in shadow DOM?


It depends on what browser & version you’re using. Some of them have old versions of the Shadow DOM spec, and so Polymer has to polyfill it instead of using it natively to get the features it needs.

I’m using Chrome 33.0.1750.22 dev and Shadow DOM is still polyfilled for me unless I turn on the “Enable experimental Web Platform features” flag in about:flags.

Answered By – CletusW

Answer Checked By – Mildred Charles (FlutterFixes Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *