r/JavaScriptTips • • Mar 22 '23

When using window.open(url,popup) how to get a spinner until the url loads and wanted to show popup if url loads successfully with status 200 and show error modal on failure of this url.

0 Upvotes

3 comments sorted by

1

u/Leather_Advice_405 Mar 23 '23

How to check if the url is loading with out using a setTimeout()

2

u/seanmorris Mar 23 '23

Call .postMessage on window.opener from inside the popup page.