Closed ryandraper closed 8 years ago
it is 99% sync, but with a small (but needed) delay from the dom. Sadly, you cannot tell from JS when or if the download is done. you can probably catch the simulated click event that initiates the download using event delegation. From what I've seen in the field, you should be able to reliably close your popup using a short (say 50ms) setTimeout called just after download().
Thanks for clearing that up for me. Thanks again for the library.
Hi, thanks for this awesome library. I just have a couple questions.
1.) is the download function asynchronous? 2.) is there a way notify the calling code when it is done?
My motivation for asking is that I want to close the parent window when the download starts or completes. I know this isn't really an issue with the code, just wondering if I can make it do what I want:)