[whatwg] HTMLDocument.title and SVGDocument

On Jun 1, 2007, at 3:21 PM, Ian Hickson wrote:

> On Sat, 10 Feb 2007, Anne van Kesteren wrote:
>>
>> If HTMLDocument really is going to apply to every Document object...
>> then at least HTMLDocument.title needs to somehow not clash with
>> SVGDocument.title or do both or something.
>
> I basically see two options: HTMLDocument.title always wins, and  
> you can
> get the other one using getFeature(), or, they both get redefined  
> to check
> the root element and dispatch to the other one if appropriate.
> Suggestions?

I like the "check the root element" option. That way, one could use  
the exact same Document object implementation for SVG and XHTML,  
while remaining compatible with expected behavior for existing  
content in both languages. Compound documents where both the HTML and  
the SVG have a title are possible, but that seems obscure enough that  
a special DOM API to get both titles is probably unnecessary.

Regards,
Maciej

Received on Friday, 1 June 2007 16:06:12 UTC