diff --git a/lib/mixins/element-mixin.js b/lib/mixins/element-mixin.js index c931fb7fc0..a8dbc8ab14 100644 --- a/lib/mixins/element-mixin.js +++ b/lib/mixins/element-mixin.js @@ -672,9 +672,13 @@ export const ElementMixin = dedupingMixin(base => { if (n.attachShadow) { if (dom) { if (!n.shadowRoot) { - n.attachShadow({mode: 'open'}); + if (window.ShadyDOM) { + ShadyDOM.upgrade(dom, this, {mode: 'open'}); + } else { + n.attachShadow({mode: 'open'}); + n.shadowRoot.appendChild(dom); + } } - n.shadowRoot.appendChild(dom); if (syncInitialRender && window.ShadyDOM) { ShadyDOM.flushInitial(n.shadowRoot); }