Skip to content

HTMLTableElement caption/tHead/tFoot setters exception inconsistencies #6089

@TRowbotham

Description

@TRowbotham
  • HTMLTableElement.caption

    Does not mention anything about throwing an exception when the new value is neither null nor HTMLTableCaptionElement, but setting to a value that is neither of these causes a TypeError to be thrown.

  • HTMLTableElement.tHead

    The setter steps say that setting to a value that is neither null nor HTMLTableSectionElement should throw a HierarchyRequestError, but browsers seem to throw a TypeError instead.

  • HTMLTableElement.tFoot

    Same as HTMLTableElement.tHead.

Tested in Firefox and Edge Chromium.

Example:

const t = document.createElement('table');
const a = document.createElement('a');

t.caption = a;
t.tHead = a;
t.tFoot = a;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions