1 <html> 2 <head> 3 <style type="text/css"> 4 #square { width: 100px; height: 100px; } 5 .red { background: red; } 6 .green { background: green; } 7 </style> 8 <script type="text/javascript"> 9 function test() 10 { 11 var linkStr = '<link rel="stylesheet" type="text/css" href="resources/doesnotneedtoexist">'; 12 var target = document.getElementById('t'); 13 target.innerHTML = linkStr; 14 target.innerHTML = ''; 15 var square = document.getElementById('square'); 16 square.className = 'green'; 17 } 18 </script> 19 </head> 20 <body onload="test()"> 21 <p> 22 This is a test for <i><a href="https://bugs.webkit.org/show_bug.cgi?id=9252">http://bugzilla.opendarwin.org/show_bug.cgi?id=9252</a> 23 REGRESSION: Very odd roll-over issues (content disappearing)</i>. 24 </p> 25 <p> 26 There should be a green square below. 27 </p> 28 <hr> 29 <div id="t"></div> 30 <div id="square" class="red"></div> 31 </body> 32 </html> 33