tor-throws').innerHTML;
const instantiate = document.getElementById('instantiate').innerHTML;

test_with_window((w) => {
  assert_rethrown_error_event(w.errors[0]);
}, 'Document parser invokes the constructor that throws',
  constructor_throws + instantiate);

test_with_window((w) => {
  w.document.body.innerHTML = instantiate;
  assert_rethrown_error_event(w.errors[0]);
}, 'Upgrade reaction invokes the constructor that throws',
  constructor_throws);
</script>

<!--
Test when JavaScript returns without thr