We have a webpage that contains an iframe containing a large third-party website (with sameorigin allowed). Whenever a user clicks on something inside of the iframe, it takes a long time before that next page inside the iframe is shown. During those few seconds, the user doesn't get shown any loading indicators since the page that's loading is inside of the iframe.
How can I detect that the iframe is loading, so that I can display a loading indicator outside of the iframe?