A DecoupledEditor created from initial data alone, with no source element to attach to,
is a detached editor: it creates its editable but leaves placing it in the DOM to the
integration. So between Create editor and Mount editable the data
is loaded while the editable is detached. The tree the <style> elements from the
data's <head> belong to is unknown then – it may still turn out to be
document.head, a shadow root, or nothing at all – so nothing may be rendered until the
editable is connected.
The mount target is chosen at mount time, so the same editor instance can end up in the light DOM or
in a shadow root. The data variants set different declarations for h2 and
p, so styles left over from a previously loaded document show up in the content, which is
what to watch – the report only counts them and says where they are.
What to check:
document.head. The data is loaded – the editable simply is not anywhere yet.
document.head and the content picks up the variant colors.
document.head, and the content inside the shadow root is styled.
<script> in the data is preserved in the output but never runs: no alert.The styles are rendered once the editable is connected, which the browser reports asynchronously, so the report is taken a moment after each action. Refresh report takes another look.