[whatwg] The new content model for <details> breaks rendering in MSIE5-7

On 29/09/2009 17:55, Dean Edwards wrote:
> On 29/09/2009 16:12, Tab Atkins Jr. wrote:
>> On Tue, Sep 29, 2009 at 8:47 AM, Dean Edwards<dean.edwards at gmail.com>
>> wrote:
>>>
>>> This will also affect the<figure> element.
>>>
>>> Test case:
>>>
>>> http://dean.edwards.name/test/details.html
>>
>> Luckily this has already been discovered and hacked around:
>>
>> http://lists.w3.org/Archives/Public/public-html/2009Sep/0802.html
>>
>> This hack can also be applied via document.write(), so it can be
>> integrated into existing scripts that fix legacy IE renderings via the
>> document.createElement() hack. (The only restriction is that it
>> immediately switches IE parsing into body mode, so it must be the very
>> last thing in<head>.)
>>
>
> I can't get it to work using document.write(). Do you have a live example?
>

It's always the last thing you try. :)

http://dean.edwards.name/test/details2.html

There is a nasty side effect though. As you mentioned the 
document.write() should be the last thing in the <head>. If there are 
any scripts following the document.write() then they are *not executed*. 
I consider this a serious drawback. With server software generating 
script elements all over the place there are bound to be problems with 
this technique. It would be nice to find a better solution.

-dean

Received on Tuesday, 29 September 2009 10:10:43 UTC