dow.document.write('<b>some text</b>'));
     assert_equals(result.exception, null);
     assert_equals(another_window.document.querySelector('b').outerHTML, '<b>some text</b>');
 }, 'document.write of another document must not throw an InvalidStateError when synchronously constructing a custom element');

 promise_test(async function () {
     const another_window = await create_window_in_test(this);
     const result = await construct_custom_element_in_parser(this, (document) => another_window.document.wr