};
  function TestElement() {
    throws = true;
    assert_throws_exactly(err, () => {
      Reflect.construct(w.HTMLElement, [], new.target);
    });
  }

  const ElementWithDynamicPrototype = new Proxy(TestElement, {
    get: function (target, name) {
      if (throws && name == "prototype")
        throw err;
      return target[name];
    }
  });

  w.customElements.define("test-element", ElementWithDynamicPrototype);

  new ElementWithDynamicPrototype();

}, "Rethrow any exceptions thrown while gettin