SupportedError`);

  test_with_window((w) => {
    assert_throws(expectNotSupportedError, () => {
      define_and_create_element(w, class extends w.HTMLElement {
        constructor() { super(); w.document.createElement('div').appendChild(this); }
      });
    });
  }, `${description}6.1.6. If result\'s parent is not null, then throw a NotSupportedError`);

  test_with_window((w) => {
    assert_throws(expectNotSupportedError, () => {
      define_and_create_element(w, class extends w.HTMLElement {
      