How to stop download in downloadHandler

A post was split to a new topic: "document.getElementById('downloadData').click();"