Comment 5 for bug 286289

Revision history for this message
In , Phil-crosby (phil-crosby) wrote :

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
 "http://www.w3.org/TR/html4/strict.dtd">
<html>
<!--
 this page doesn't validate; w3c doesn't think you can nest <b> tags. Not sure what the expected behavior should be.
 Filed as: https://bugzilla.mozilla.org/show_bug.cgi?id=381808
-->
<head>

<script type="text/javascript">
function init(){
 document.getElementById("msg").innerHTML="section 1";

 /* produces the DOM tree (use firebug to inspect):

 <b><b><b>
  <div id="msg">
   <b><b><b>section 1</b></b></b>
  </div>
 </b></b></b>

 instead of the expected:

 <b><b><b>
  <div id="msg">
   section 1
  </div>
 </b></b></b>

 */
}
</script>

<style>
/* these style declarations are optional */
b{
 display:block;
 font-weight:normal;
}
</style>
</head>

<body onload="init();">

 <!-- these two DOM trees will be loaded differently, because the first div has its
  contents set with Javascript through innerHTML, while the second doesn't.
 -->
 <b><b><b>
  <div id="msg"></div>
 </b></b></b>

 <b><b><b>
  <div id="msg2">section 2</div>
 </b></b></b>
</body>