title: When does a video element created with document.createElement get garbage collected if played without appending it to the page?
body: <p>Say I create a video and play it like so:</p>
  
  <pre><code>async function createVideo() {
      const videoEl = document.createElement("video");
      videoEl.autoplay = true;
      videoEl.src = "https://archive.org/download/BigBuckBunny_124/Content/big_buck_bunny_720p_surround.mp4";
  
      await videoEl.play()
      return videoEl
  }
  
  createVideo()
      .then(() =&gt; console.log('video is playing'))
      .catch(error =&gt; console.log(error))
  </code></pre>
  
  <p>On chrome, this causes the video to play, except without the element actually existing in the DOM. </p>
  
  <p>At what point will that video get garbage collected?</p>
  
  <p>Additionally, how would garbage collection work if within <code>createVideo()</code> we run <code>video.pause()</code> before returning the video element? Would the video element stick around as a zombie forever?</p>