My web app can generate a PDF report (using PDFMake) which appears in a new window that I open in front of the main app window. In some cases, it will take a long time to finish and load that PDF. I want the window to open immediately, show a progress indicator (rotating icon) and then have the PDF loaded. What happens is that the window does not open until the PDF is generated. It’s as if the visual changes are blocked while the code that generates the PDF runs.
I tried adding an onShow event handler to delay generating the PDF until after the window was visible, but the window still did not open until after quite some delay for large PDFs. For smaller PDFs, things do happen quickly.
Is there a way to block everything else so that window can open immediately, show its spinning progress indicator, and only then run the code to generate the PDF?