Discussion:
Insert a "Waiting/Busy" Icon Into Browser Widget
Sannyasin Brahmanathaswami via use-livecode
2018-11-30 17:19:24 UTC
Permalink
I watch with interest all of HH amazing thing he does the browser widget. Haven't had time to keep up. But I have a common use case that I can't figure out that possibly relates

a) On mobile, let's say you have connectivity… It may not be fast at the moment, but it is it good enough for you to wait.
b) We "install" a web URL on the browser widget.
c) Now… the page has a big pay load… usually a lot of JS coming thru first, before it renders at anything.
Two examples
One is a badly designed site .. some "Wicks" platform :
https://www.hindouisme.org/

The other is a huge HTML5 application
https://mydigitalpublication.com/publication?m=45852&l=1

d) You get a "white screen" as the browser is busy getting resources.
e) User thinks it has "hanging

I have tried using native LC to display a busy "spinner" . But inevitably the browser takes over the CPU and such things as

browserFinishedLoading pUrl

don’t work.

So, now, is possible to "insert" JS script into a browser, right at "init" to display a spinner, while we wait for the full page render?

BR



Brahmanathaswami
browserFinishedLoading pUrl
hh via use-livecode
2018-11-30 23:30:47 UTC
Permalink
The following works tested here on desktop, should work everywhere where the browser widget works.

1. Overlay browser widget "browser" with a browser widget "loader" (that displays a loading animation).
2. Load the slow loading url into widget "browser".
3. Hide widget "loader" by browserDocumentLoadComplete of widget "browser".

For example:
http://forums.livecode.com/viewtopic.php?p=173867#p173867

Loading...