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

Dean Edwards dean.edwards at gmail.com
Tue Sep 29 12:08:13 PDT 2009


On 29/09/2009 19:30, Keryx Web wrote:
> 2009-09-29 19:10, Dean Edwards skrev:
>
>> 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.
>>
>
> I consider this a deal breaker. Fragile and unintuitive hacks, that
> really no one knows or can explain why they work, is NOT the kind of
> things we should rely on when pushing for HTML5.
>

I'm starting to think that too. MSIE5-7 accounts for about a third of 
web users. This admittedly clever hack is just too hackish.

You have two choices to get around the <dd> rendering bug:

1. The potentially dangerous document.write()

2. Inserting weird conditional comments into your code:

     </head>
      <!--[if lt IE 8]><object><!<![endif]-->
     <body>

I don't like either solution.

-dean


More information about the whatwg mailing list