Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<!-- starting html: -->
<div class="elements-to-be-parsed">
<pre>
<div data-o-type="list"></div>
</pre>
<pre>
<div data-o-type="object"></div>
</pre>
</div>
<!-- generated html: -->
<div class="elements-to-be-parsed">
<div class="output-container" style="display: flex">
<pre>
<div data-o-type="object"></div>
</pre>
<pre>
{}
</pre>
<div style="display:none;" class="rendered"><div data-o-type="object"></div></div>
</div>
<div class="output-container" style="display: flex">
<pre>
<div data-o-type="object"></div>
</pre>
<pre>
{}
</pre>
<div style="display:none;" class="rendered"><div data-o-type="object"></div></div>
</div>
</div>
<script>
renderedElemString = `<div style="display:none;" class="rendered">${innerHTMLFromPre}</div>`
document.querySelector(".elements-to-be-parsed").children;
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.