Hacker News new | ask | show | jobs
by joshmarinacci 613 days ago
That’s good to hear. I’m excited to see you’ve got a good html parser. That’s worth a lot just by itself.
1 comments

Yes, the HTML parser, probably the component that is the most spec compliant. I think the CSS parser also is. For the initial phase, I think it is more important to get something working. For a later implementation, the spec should dictate what we do and what not. But with a small team, it is just not feasible.
Isn't one of the difficultlies of writing a browser that your parser must accept lots of invalid inputs and render it like other browsers would?
HTML5 parsing is relatively easy, because behavior for tag soup is 100% specified. That is, in theory, all conformant HTML5 parsers should output the same DOM for any arbitrary byte sequence.

Layout is much harder because the CSS spec is full of UB, so you will have to do some reverse engineering there.