Re: New elements vs. Trident

On Sep 16, 2007, at 5:31 PM, Dean Edwards wrote:

> Maciej Stachowiak wrote:
>> Namespace hacks are certainly an appealing option, if they can  
>> avoid the need for script. But how would you make this work in both  
>> IE and in other browsers (including newer browsers that actually  
>> support the hypothetical newelement)? Would you conditionally serve  
>> as HTML to IE and XHTML to other browsers?
>
> The namespaced solution works for XHTML served as HTML which  
> everyone seems to hate.
>
> Further, the IE namespaced version works with any DOCTYPE. Other  
> browsers will of course respect the DOCTYPE and complain that xmlns  
> is not a valid HTML attribute..
>
> I thought it was worth mentioning then namespace hack but I don't  
> see it solving the underlying problem for MSIE's DOM parser.

For the namespace hack to do the right thing in future browsers that  
handle the element natively, it would be necessary to either serve as  
XML to such browsers, or to do something to conditionally hide the  
namespace hack. So I guess it's not much of an improvement over script- 
based fixup, except perhaps in specialized situations.

Regards,
Maciej

Received on Monday, 17 September 2007 00:35:20 UTC