Take a heap snapshot to open a popup windowwin = window.open(..)Take a heap snapshot (in DevTools' Memory tab → Take Snapshot) to navigate the popup to a heavy documentwin.location = '..'Take a heap snapshotNow close the popup (manually)Take a heap snapshot.
Notice it still includes the heavy document as a DetachedWindow.
open a popup window to unset our reference to the popup:win = nullTake a heap snapshot.
Notice the heavy document and DetachedWindow are now gone.