Hacker News new | ask | show | jobs
by rixed 616 days ago
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?
1 comments

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.