Cleanup DOM when some frames are removed and no new frames to come.