[whatwg] HTMLDocument.title and SVGDocument

Maciej Stachowiak mjs at apple.com
Fri Jun 1 16:06:12 PDT 2007


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




More information about the whatwg mailing list