layout/tables/crashtests/460637-1.xhtml

Fri, 16 Jan 2015 18:13:44 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 18:13:44 +0100
branch
TOR_BUG_9701
changeset 14
925c144e1f1f
permissions
-rw-r--r--

Integrate suggestion from review to improve consistency with existing code.

     1 <html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
     2 <head><script type="text/javascript">
     3 <![CDATA[
     5   function boom() {
     6     var HTML_NS = "http://www.w3.org/1999/xhtml";
     7     var r = document.documentElement; while(r.firstChild) { r.removeChild(r.firstChild); }
     8     var table = document.createElementNS(HTML_NS, "table");
     9     table.setAttribute("border", "1");
    10     var text = document.createTextNode("\n ");
    11     table.appendChild(text);
    12     var tr1 = document.createElementNS(HTML_NS, "tr");
    13     table.appendChild(tr1);
    14     var tr2 = document.createElementNS(HTML_NS, "tr");
    15     var input = document.createElementNS(HTML_NS, "input");
    16     tr2.appendChild(input);
    17     table.appendChild(tr2);
    18     document.documentElement.appendChild(table);
    19     var tr3 = document.createElementNS(HTML_NS, 'tr');
    20     table.insertBefore(tr3, text);
    21     var td = document.createElementNS(HTML_NS, 'td');
    22     td.setAttribute('rowspan', 0);
    23     tr3.insertBefore(td, null);
    24     table.removeAttribute('border');
    25     var caption = document.createElementNS(HTML_NS, 'caption');
    26     table.insertBefore(caption, tr2);
    27     document.documentElement.removeAttribute("class");
    28   }
    30   function ol(e) {
    31     window.removeEventListener("load", ol, false);
    32     setTimeout(boom, 400);
    33   }
    35   window.addEventListener("load", ol, false);
    37 ]]></script>
    38 </head>
    40 <body></body>
    41 </html>

mercurial