Open Bug 848096 Opened 11 years ago Updated 2 years ago

TD elements should be HTMLTableDataCellElement and not HTMLTableCellElement

Categories

(Core :: DOM: Core & HTML, defect, P5)

defect

Tracking

()

People

(Reporter: erik, Unassigned)

Details

tr elements have the wrong prototype/constructor


var tr = document.createElement('tr');

assert(tr instanceof HTMLTableDataCellElement);
assert(tr.constructor === HTMLTableDataCellElement);
assert(Object.getPrototypeOf(tr) === HTMLTableDataCellElement.prototype);
IE gets this right
Sorry. "td"

var td = document.createElement('td');

assert(td instanceof HTMLTableDataCellElement);
assert(td.constructor === HTMLTableDataCellElement);
assert(Object.getPrototypeOf(td) === HTMLTableDataCellElement.prototype);
Summary: TR elements should be HTMLTableDataCellElement and not HTMLTableCellElement → TD elements should be HTMLTableDataCellElement and not HTMLTableCellElement
Okay... So HTML split this up to only add .abbr to <th> but then .abbr is still on <td> via the "obsolete" section meaning we still have .abbr on both <td> and <th> but now for each it's on their own descendent interface. Not sure if this is an improvement...
Yeah, I think this is bogus.  There's no reason I can think of for this split and the ensuing compat-breakage....

Left to my own devices, I'd wontfix this and file a bug on hixie here.  Peter?
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046

Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5.

If you have questions, please contact :mdaly.
Priority: -- → P5
Component: DOM → DOM: Core & HTML
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.