vent(error);
  assert_equals(error.error.name, 'InvalidStateError');
}

test_with_window((w) => {
  // "create an element" 6.1.3, throw a TypeError.
  // https://dom.spec.whatwg.org/#concept-create-element
  assert_type_error_event(w.errors[0]);
}, 'Document parser invokes the constructor that returns a bad object',
  constructor_returns_bad_object + instantiate);

test_with_window((w) => {
  // "upgrade an element" 10, throw an InvalidStateError DOMException.
  // https://html.spec.whatwg.org/multipage/scr