Use browser() to apply Web component correctly. By calling update() in the returned object, <pre is="marp-pre"> in the document will change to <marp-pre>. pre tag is a one of elements that has not supported is attribute due to security reason.
is attribute in VS Code's incremental DOM update has a different problem.
The node has to replace to upgrade into the custom element. setAttribute('is', 'marp-xxx') to the same node does not trigger of upgrade. VS Code's preview updation by morphdom is not handling this case.
:arrow_right: When brought incremental update of Markdown, Marp for VS Code will find out not-upgraded elements and replace the node into the custom element by assigning the same value of outerHTML by self. There are no effects to already processed nodes so it would bring less performance hit.
Applied a patch from Marp Core v3.2.1.
browser()
to apply Web component correctly. By callingupdate()
in the returned object,<pre is="marp-pre">
in the document will change to<marp-pre>
.pre
tag is a one of elements that has not supportedis
attribute due to security reason.is
attribute in VS Code's incremental DOM update has a different problem.setAttribute('is', 'marp-xxx')
to the same node does not trigger of upgrade. VS Code's preview updation by morphdom is not handling this case.outerHTML
by self. There are no effects to already processed nodes so it would bring less performance hit.Fix #360.