stom-element>hello</custom-element></td></tr>');

    const table = contentDocument.querySelector('table');
    assert_equals(table.tFoot, tfoot);
    const newThead = contentDocument.createElement('tfoot');
    table.tFoot = newThead; // Chrome doesn't support setting to null.
    assert_equals(table.tFoot, newThead);
    assert_array_equals(element.takeLog().types(), ['disconnected']);
}, 'tFoot on HTMLTableElement must enqueue disconnectedCallback when removing a custom element');

test_with_window(funct