W3C home > Mailing lists > Public > public-html@w3.org > November 2008

Black-box equivalence of parsing fragments directly into context node

From: Henri Sivonen <hsivonen@iki.fi>
Date: Mon, 17 Nov 2008 16:19:16 +0200
Message-Id: <3AB9ACA5-B5DA-4E3B-9400-BA9326487874@iki.fi>
To: HTML WG <public-html@w3.org>

I'm considering implementing HTML5 innerHTML setting in Gecko by using  
the owner document of the context node as the document seen by the  
parser and by sticking the context node as the first node on the stack  
(but masking its name to show "html" to the tree builder in order to  
avoid breaking the fragment algorithm assertions) and by then running  
the fragment parsing algorithm without returning to the event loop  
until done. The context node would be in the tree for the entire time.  
I'd deflect attempts to add more attributes to the root node upon  
stray <html> tag.

Is there a reason why the spec doesn't prescribe this? Why does the  
spec specify parsing into another document first and then moving the  
nodes over? Is what I described above not black-box equivalent to the  
steps that the spec prescribes?

-- 
Henri Sivonen
hsivonen@iki.fi
http://hsivonen.iki.fi/
Received on Monday, 17 November 2008 14:20:00 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:38:59 UTC