[whatwg] "html" start tag token in the root element phase

Philip Taylor excors+whatwg at gmail.com
Mon Feb 11 15:52:20 PST 2008


On 29/06/2007, Henri Sivonen <hsivonen at iki.fi> wrote:
> If the spec dealt with the "html" start tag token directly in the
> root element phase, the parse error in the main phase wouldn't need
> to be conditional. (Implementations that experience a perf benefit
> from not mutating the attributes of a node probably want to hoist the
> "html" node creation to the root element phase for perf reasons, too.)

There's also an issue with:

  <!doctype html>
  foo
  <html>

not producing any parse error, because the <html> is the first start
tag token (at least under my interpretation) and therefore is
considered valid. Handling <html> specially in the root element phase
seems like a reasonable way of fixing this.

-- 
Philip Taylor
excors at gmail.com



More information about the whatwg mailing list