I'm providing a link to download XML files:
<a href="http://exemplo.com/link" download="">
Baixe o XML do pedido
</a>
However, because it is a bit slow processing due to the number of functions needed, I would like to put a loading
on the page so that the user does not have the feeling that nothing is happening. Because clicking several times, the download is also done several times ...
As far as I know, there is no downlaod
event, but I just need to simulate this behavior, so I can close loading
at the time the download actually happens.
The loading
that I mean would be simple, I do it myself, my question is really to simulate the event.
I would like to make the solution as simple as possible without using any plugins.