DesktopHTMLViewer: DocumentBegin/Complete not firing

Hello
I’m currently working with DesktopHTMLViewer displaying web pages. This is working fine. I would like to show a progress icon (ProgressWheel) when the load of a page starts and to hide it when the page finished loading. Therefore I use the events DocumentBegin and DocumentComplete. The funny thing: It works only on the very first page load and then the events don’t trigger again as soon as I click a link within the page to head to another one.
Am I understanding the events in a wrong way or is this a bug?

Xojo Version 2023 Release 1 (Mac)

IIRC doing that fires a different event - CancelLoad

If you’re displaying a website with a lot of fancy JavaScript it could be that the page is not actually changing. Examples of services that do this are Apple Music and Spotify.

Think of it like the Shell class. Shell is not a full-on terminal. HTMLViewer is not a full-on web browser.

Thank you both. I’ve tested mainly with a Confluence page which may be a bit fancy.
I already abuse the CancelLoad to find out whether a page link was clicked or a download link. It’s the only one triggering on each link click. Yes, I could use that one as well to find out a link was clicked (to display the progress wheel) but then there is no event telling me when the page is loaded. So I guess the best solution is not to display the progress well at all.
Thank you for your answers!

This is what my CancelLoad event comments look like. In that particular Viewer, I will have received arbitrary HTML to load into it, and will have done some amount of cleaning of it beforee loading it in:

// Called when the content of the HTMLViewer is about to be replaced. If this is due
// to loading an html string into the control, then it seems the URL will be
// “about:blank”. If it happens due to the user clicking on a link in the HTMLViewer,
// we want to show that one in the user’s browser. Any links in the control will
// either have no “target” attribute, or it will have been be changed to “_self”.
// This will force all clicked links to trigger this event, which then uses GotoURL()
// to display the linked page in the user’s browser, rather than here.
//
// Under Win7 the page loaded from code goes via a temporary file. When an external
// link is clicked, the URL has the normal form, but also another event occurs with
// the “about:blank” URL.
//
// For macOS, mailto: is handled via an AppleEvent triggered by the GotoURL. For
// Win/Lin, it is handled via communication from the HTMLViewer, so nothing to do here.

Thank your this! My application should run on Win, Mac and Linux, have to test the behavior with all 3 OS then!