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