On Tue, 11 Sep 2012 10:29:06 +0200, Elliott Sprehn <[email protected]> wrote:

On Tue, Sep 11, 2012 at 1:23 AM, Simon Pieters <[email protected]> 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.

http://code.google.com/codesearch?q=createHTMLDocument%5C(%5C)+lang:js 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

Reply via email to