pt src="../resources/custom-elements-helpers.js"></script>
<script src="./resources/reactions.js"></script>
</head>
<body>
<div id="log"></div>
<script>

test_with_window(function (contentWindow, contentDocument) {
    const element = define_custom_element_in_window(contentWindow, 'custom-element', []);
    contentDocument.body.innerHTML = `<table></table>`;
    const table = contentDocument.querySelector('table');

    const caption = contentDocument.createElement('caption');
    caption.innerHTML = '<cust