TD elements should be HTMLTableDataCellElement and not HTMLTableCellElement

NEW
Unassigned

Status

()

Core
DOM
P5
normal
5 years ago
23 days ago

People

(Reporter: Erik Arvidsson, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
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);
(Reporter)

Comment 1

5 years ago
IE gets this right
(Reporter)

Comment 2

5 years ago
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

Comment 3

5 years ago
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
You need to log in before you can comment on or make changes to this bug.