ementWithDynamicPrototype);

    returnNotAnObject = true;
    new ElementWithDynamicPrototype();
  }, "If prototype is not object (" + notAnObject + "), derives the fallback from NewTarget's realm (autonomous custom elements)");

  test_with_window(w => {
    // We have to return an object during define(), but not during super()
    let returnNotAnObject = false;

    function TestElement() {
      const o = Reflect.construct(w.HTMLElement, [], new.target);

      assert_equals(Object.getPrototypeOf(new.ta