Maybe revokeObjectURL can be used to make the explicit downloads.erase unneccessary? https://developer.mozilla.org/en-US/docs/Web/API/URL/revokeObjectURL
Maybe this prevents the download list from popping up showing an empty list (and blocking the usual user keybinds, forcing the user to press escape first to close the download list).