How Do Javascript Engine Count Number Of Tag Of The Html Document Is Ill-formed?
have a great day. How are you.
<
Solution 1:
My question is how do javascript engine make that?
It doesn't. By the time you're using JavaScript to access the resulting DOM document, the structural problems like unclosed tags have already been resolved by the browser's HTML parser. All that's happening in the line of code that you've shown is that the JavaScript engine is asking the DOM how many a
elements ended up being in the document after the HTML, with all its issues, had been parsed.
The HTML specification has a lot to say about recovering from invalid markup, information and techniques that were determined over a period of 20 years by various browser implementations and eventually agreed to by the members of the WHAT-WG as a common set of error-correction approaches.
Post a Comment for "How Do Javascript Engine Count Number Of Tag Of The Html Document Is Ill-formed?"