How to get response when export PNG/PDF is done

Since it needs to wait for a while, I want to display a loading modal while waiting, and close the modal when it is finished.
I tried to add addEventListener function to the corresponding t.submit() in diagramWithEditor.js, but it didn’t work.(There’s no message in console)


Is there any other way to get a response before downloading to close the modal?

Unfortuntely there is no such event for the export process