stom_element_in_window(contentWindow, 'custom-element', []);
    contentDocument.body.innerHTML = `<table><caption><custom-element>hello</custom-element></caption></table>`;
    const caption = contentDocument.querySelector('caption');
    assert_array_equals(element.takeLog().types(), ['constructed', 'connected']);
    assert_equals(caption.innerHTML, '<custom-element>hello</custom-element>');

    const table = contentDocument.querySelector('table');
    assert_equals(table.caption, caption);
    const ne