[whatwg] DOM4: createHTMLDocument argument

Simon Pieters simonp at opera.com
Tue Sep 11 01:57:38 PDT 2012

On Tue, 11 Sep 2012 10:29:06 +0200, Elliott Sprehn <esprehn at gmail.com>  

> On Tue, Sep 11, 2012 at 1:23 AM, Simon Pieters <simonp at opera.com> wrote:
>> ...
>> The title element is required in HTML. What are the use cases for  
>> creating a
>> document without a title?
> It's not required for <iframe srcdoc> (or HTML in email, ...) so if
> you were building a document to then serialize to assign as a srcdoc
> you might want to omit it.

If you've built a DOM, I think it makes more sense to just insert it to  
the iframe's document instead of serializing it and letting the browser  
parse it again. But still, iframed documents don't necessarily need a  
title, I can agree with that, but the spec currently only allows it for  
the srcdoc document.

seems to suggest there's content out there that omits the argument so  
there can be a compat win to support the no-argument case.

Should the spec say to omit the title element altogether when the argument  
is omitted?

Simon Pieters
Opera Software

More information about the whatwg mailing list