<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
 <head>
  <title>DOM Core Stress Test: Row and Cell Node Creation</title>
  <script type="text/javascript"><![CDATA[
    var maxRow = 20;
    var maxCell = 50;
    function doTest() {
      var start = new Date;
      var container = document.getElementById('container');
      var count = 0;
      for (var countRow = 0; countRow < maxRow; ++countRow) {
        var row = document.createElementNS('http://www.w3.org/1999/xhtml', 'div');
        container.appendChild(row);
        for (var countCell = 0; countCell < maxCell; ++countCell) {
          var cell = document.createElementNS('http://www.w3.org/1999/xhtml', 'div');
          row.appendChild(cell);
          var text = document.createTextNode('Cell ' + ++count);
          cell.appendChild(text);
        }
      }
      var end = new Date;
      document.getElementById('result').childNodes[0].nodeValue = 'Test took ' + ((end - start) / 1000) + ' seconds.';
    }
  ]]></script>
  <style type="text/css">
    #container > * { display: table-row; }
    #container > * > * { display: table-cell; }
  </style>
 </head>
 <body onload="doTest()">
  <p id="result">Testing...</p>
  <div id="container"/>
 </body>
</html>
