[whatwg] Document.title for SVG documents

Jonas Sicking jonas at sicking.cc
Mon Feb 3 16:59:49 PST 2014


On Mon, Feb 3, 2014 at 4:25 PM, Cameron McCormack <cam at mcc.id.au> wrote:
> Ian Hickson wrote:
>>
>> I'm all for handling it in one place. What precisely do you want the
>> behaviour to be? (Consider HTML-in-SVG and SVG-in-HTML also -- "the first
>> <svg:title>  element" may come after "the first<html:title>  element", and
>> vice versa. Also consider when one or the other is "primary" but the
>> relevant element is absent.)
>
>
> OK, how about: if the document element is an <html:html>, we choose the
> first <html:title> in document order; if the document element is an
> <svg:svg>, we choose the first child <svg:title> of the document element;
> otherwise, null.

An even simpler solution would be to say "we choose the first
<html:title> or <svg:title> in document order". That has the nice
property that we align SVG and HTML more.

/ Jonas



More information about the whatwg mailing list