{
  let supported = false;
  customElements.define('feature-detect', class extends HTMLDivElement {}, { get extends() { supported = true; return "div"; } });
  return supported;
})();

promise_test(async t => {
  let w = await create_window_in_test(t, `<script>self.MyElement = class extends HTMLElement { constructor() { throw new Error(); } };</`+`script>`);
  let w2 = await create_window_in_test(t);
  w2.customElements.define('my-element', w.MyElement);
  let nextErrorPromise = nextErrorEvent([self, w, w2]