* @see <a href="http://msdn.microsoft.com/en-us/library/ms534621.aspx">MSDN Documentation</a>
* @see <a href="http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-one-html.html#ID-79105901">
* DOM Level 1</a>
*/
public int jsxGet_sectionRowIndex() {
DomNode row = getDomNodeOrDie();
final HtmlTable table = ((HtmlTableRow) row).getEnclosingTable();
if (table == null) { // a not attached document.createElement('TR')
if (!getBrowserVersion().isIE()) {
return -1;
}
// IE 6, 7 and 8 return really strange values: large integers that are not constants
// as tests on different browsers give different results
return 5461640;
}
int index = -1;
while (row != null) {
if (row instanceof HtmlTableRow) {
++index;
}
row = row.getPreviousSibling();
}
return index;
}