> On Nov 22, 2017, at 11:25 AM, Olaf Krueger <m...@olafkrueger.net> wrote:
> 
>> No need for the browser to parse HTML markup. 
> Could you explain this a bit more?
> I have no idea how the browser works internally but I thought that if we add
> an HTML element to the DOM by using JS the browser has to parse it
> afterward?

I might be wrong, but I don’t think so. AFAIU, if you add elements to the DOM 
via JS, it simply gets added to the DOM tree directly. It has nothing to do 
with the DOM parser. Internally, the browser does not use the HTML markup. It’s 
just a language that the browser needs to understand to create the tree. Using 
JS bypasses the parsing step.

> I am also interested what your experience is about the readability of the
> transpiled code.
> Is there a need to dive into this JS code (The part of the code that creates
> and manipulates the DOM) if something went wrong? Or is it easy enough to
> follow what's going on?

I find it easy to follow. The DOM structure exists in the browser once it’s 
created, so the structure can be examined there. I think you can even dump the 
HTML markup representation of that structure if you really want.

Reply via email to