How does js simulate alert blocking?

< Content >

        <cc1:StiWebViewer ID="webViewer" runat="server"  ShowSave="False"   Width="1216" Height="900" 
        ShowParametersButton="False" ShowBookmarksButton="False" ShowPrintButton="False" ShowViewMode="False"/>
        <cc2:StiWebDesigner ID="StiWebDesigner1" runat="server"   OnSaveReport="StiWebDesigner1_SaveReport"/>
    </Content>
    aspx
    

clipboard.png

:

clipboard.png

but if you use js to write an alert (), when the page is loaded, you can load it normally after clicking alert. So I thought, how can I simulate this alert event so that the user can display the report normally when he clicks in for the first time? Do you have any tips from the boss? QAQ

Mar.12,2021

js is inherently non-blocking, so you have to make it Synchronize
through callback or promise


you can't solve the problem in this hack way. As for blocking, you can use while (true) to simulate


if you have access to babel, you can use async await to change non-blocking to blocking


change the order of imported files

.
Menu