Short description of issue
Theme editor won’t work with declarative shadow DOM
Reproduction steps
Create a section with a minimal code using declarative shadow dom, such as:
<x-foo>
<template shadowrootmode="open">
<slot name="foo"></foo>
</template>
<p slot="foo">Hello</p>
</x-foo>
When editing a setting in the section, the theme editor will reload the section and apparenlty uses innerHTML to replace the section. However, this causes an issue when using declarative shadow dom.
Additional info
To imrpove support of declarative shadow dom, Shopify should use setHTMLUnsafe when available instead of innerHTML.
What type of topic is this
Bug report
Upload screenshot(s) of issue
![]()