Object.defineProperty(
HTMLTableElement.prototype,
'rows',
{
get: function(){
return this.getElementsByTagName('tr');
}
}
);
Object.defineProperty(
HTMLTableElement.prototype,
'tBodies',
{
get: function(){
return this.getElementsByTagName('tbody');
}
}
);
Object.defineProperty(
HTMLTableSectionElement.prototype,
'rows',
{
get: function(){
return this.getElementsByTagName('tr');
}
}
);
Object.defineProperty(
HTMLTableRowElement.prototype,
'cells',
{
get: function(){
return this.querySelectorAll('th,td');
}
}
);