[whatwg] Handling <title> inside <body>

Tommy Thorsen tommy at kvaleberg.com
Mon Nov 10 06:31:48 PST 2008


Simon Pieters wrote:
>> The description of the title element in the spec ("4.2.2 The title 
>> element") says:
>>
>>     Contexts in which this element may be used:
>>         In a head element containing no other title elements.
>>
>> I don't care very strongly about whether or not title elements are 
>> allowed anywhere, but I do think the output of the parsing algorithm 
>> should be valid html according to the rest of the spec.
>
> Why?
>
Hmm. Good question. If not, then why do we do foster parenting at all?

 From an implementors point of view, it's good to have clearly defined 
boundaries between modules. An implementation would typically have one 
module that tokenises and parses html and one module that renders the 
resulting dom to the screen. If all the unexpected input is dealt with 
in the parsing module, then you can make some assumptions in the 
rendering module which can greatly simplify the implementation. Having 
to deal with an arbitrary amount of illegal input in either module is, 
IMHO, not the ideal design.

That being said, if Opera has the specified behaviour and Firefox is 
switching to it, then I'm no way near stubborn enough to keep arguing. 
As long as I'm reassured this is a concious decision and not an 
oversight on whatwg's part, I'll just go ahead and implement it after 
the spec.



More information about the whatwg mailing list