You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Returns an HTMLTableRowElement representing a new row of the table. It inserts it in the rows collection immediately before the <tr> element at the given index position. If the index is -1, the new row is appended to the collection. If the index is smaller than -1 or greater than the number of rows in the collection, a DOMException with the value IndexSizeError is raised.
* Removes the row corresponding to the index given in parameter. If the index value is -1 the last row is removed; if it is smaller than -1 or greater than the amount of rows in the collection, a DOMException with the value IndexSizeError is raised.
52
+
*
53
+
* @param index Index.
54
+
*/
55
+
publicdeleteRow(index: number): void{
56
+
if(arguments.length===0){
57
+
thrownewthis[PropertySymbol.window].TypeError(
58
+
"Failed to execute 'deleteRow' on 'HTMLTableSectionElement': 1 argument required, but only 0 present."
59
+
);
60
+
}
61
+
62
+
if(typeofindex!=='number'){
63
+
index=-1;
64
+
}
65
+
66
+
if(index<-1){
67
+
thrownewthis[PropertySymbol.window].DOMException(
68
+
`Failed to execute 'deleteRow' on 'HTMLTableSectionElement': The index provided (${index}) is less than -1.`,
`Failed to execute 'deleteRow' on 'HTMLTableSectionElement': The index provided (${index}) is greater than the number of rows in the table (${rows.length}).`,
0 commit comments