creating and deleting

Opera: you may have to blur the window and focus it again to see changes in the layout of the table. I consider these redrawing problems a separate bug, not the direct result of the tested methods.

This is the caption
TH in THead TD in THead TD in THead
TH in TBODY 1 TD in TBODY 1 TD in TBODY 1
TD in TBODY 1 TH in TBODY 1 TD in TBODY 1
TH in TBODY 2 TD in TBODY 2 TD in TBODY 2
TD in TFoot TH in TFoot TD in TFoot
function init () {
	x = document.getElementsByTagName('table')[0];
	newTD = document.createElement('td');
	newTD.colSpan = 3;
	newTD.appendChild(document.createTextNode('Generated TR'));
	newTR = document.createElement('tr');
	newTR.appendChild(newTD.cloneNode(true));
}

Test alert(x.createCaption().firstChild.nodeValue)
Test x.createCaption().appendChild(document.createTextNode('The new caption'));
Test x.deleteCaption()

Test alert(x.createTFoot().childNodes.length)
Test x.createTFoot().appendChild(newTR.cloneNode(true))
Test x.deleteTFoot() (crashes Explorer 5.2 Mac!)

Test alert(x.createTHead().childNodes.length)
Test x.createTHead().appendChild(newTR.cloneNode(true))
Test x.deleteTHead()

The tests with x.getElementsByTagName('tr')[1] are meant for Safari, which has serious problems with the rows[] array.

Test x.rows[1].deleteCell(0)
Test x.getElementsByTagName('tr')[1].deleteCell(0)

Test x.tBodies[0].deleteRow(1)

Test x.rows[1].insertCell(0)
Test x.getElementsByTagName('tr')[1].insertCell(0)
Test x.insertRow(1).appendChild(newTD.cloneNode(true))

Test x.moveRow(0,3)