Re: [whatwg] Document.title for SVG documents

On Mon, Feb 3, 2014 at 4:25 PM, Cameron McCormack <cam@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

Received on Tuesday, 4 February 2014 01:00:50 UTC