 gotEvent = false;
  p.addEventListener("pointerup", () => {
    gotEvent = true;
  });

  document.body.append(clone);

  promise_test(async () => {
    await test_driver.click(document.querySelector("p"));
    assert_true(gotEvent);
  }, "Moving a node to new document should move the registered event listeners together");
</script>
