Has anyone found any way to trigger a spinner, for as long as a page is loading in the webview component?
the problem, is that for as long as the page is loading the user gets annoyed without any feedback that the page is loading, now theres just a white screen
How about running a countdown in a container with a higher z index positioned above the blank webview? Only an option if you know where the webview is going to be located.
Not sure if there´s an option to play with it loading in the background and then toggle its visibility either?
thanks, sure i thought of that but im looking for a solution that works in a closed loop, meaning that only if the page gets loaded, then the spinner disappears.
Hi! Select your page (page layout), go to Properties > Advanced and you’ll see a toggle for “show spinner on load”. This means you have to manually use hide spinner again to dismiss the spinner – does this sound like what you were looking for?
Hmm at first i was sure it would work, but it seems that the page loading in webview, its not the same as the app page loading so the problem is till the same
Unfortunately I think there’s no good way of implementing that currently.
The WebView component does not provide an event for when the displayed page DOM has finished loading, which would otherwise be the first option I’d look at (i.e. hide the WebView until it’s finished loading and display a spinner instead).
Another option would be for the displayed page to communicate with your app (by JavaScript) to signal when it’s done loading. There’s no proper way to dispatch such a signal currently, and you’d have to be in control of the destination page anyway to have it do that. And if you had control of the destination, you could modify the page itself to first have a spinner only, and display more when it’s done loading data.
Pragmatically your best bets might be:
Rely on some constant delay (e.g. always display a spinner for one second),
Have WebView loading in the background if that’s possible for your use case
Display a page that’s in your control and implement the logic there