 (containerType === 'ShadowRoot') {
      const host = document.createElement('div');
      document.body.appendChild(host);
      container = host.attachShadow({mode: 'closed'});
    }

    container.setHTMLUnsafe('<my-element>');
    const myElement1 = container.querySelector('my-element');
    assert_equals(myElement1.numConnectedCallback, 1,
      'myElement1.numConnectedCallback after first setHTMLUnsafe.');
    assert_equals(myElement1.numDisconnectedCallback, 0,
      'myElement1.numDisconnectedCallb