html
html copied to clipboard
HTML parser doesn't tell when it should suspend and resume
What is the issue with the HTML Standard?
Reading about HTML parser, I came to the conclusion that the specification does not talk about:
- Should the HTML parser task be suspended if the input stream is temporarily empty (not EOF case)
- Is it necessary to suspend the HTML parser task if the input stream has a lot of data. Is it preferable to parse data in chunks?
For example, chrome and firefox handle the second case differently.
Chrome suspends parsing task when character processing reaches a certain limit (page will be updated several times). Firefox, on the contrary, analyzes the data to the end and does not make any suspends (the page will be updated once during the HTML parsing process).
The complaint about the specification is this: Why is there no preferred behavior, or, as a last resort, a note that would describe cases above and mark them as implementation-dependent.