I have an event handler for the beforeunload window event.
window.addEventListener("beforeunload", myScript);
I also have an A tag which his href is a download file link. So when I click on the link the browser file download popup opens and it causes the beforeunload to get fire. How can I prevent this from this specific link?
<a href="link">Download</a>