browserDocumentLoadComplete working correctly?

Klaus major-k klaus at major-k.de
Wed Nov 20 17:12:44 EST 2019


Hi Hermann,

> Am 20.11.2019 um 22:13 schrieb hh via use-livecode <use-livecode at lists.runrev.com>:
> 
> Yes, browserDocumentLoadComplete is working correctly and consistent
> with HTML5, no bug here.
> BrowserDocumentLoadComplete is fired as soon as the DOM is finished
> incl. *reading* your script tags.

ah, I see, thanks for the clarification!

> *After* that your javascript is *executed*. The server and browser/
> browser widget don't check/care what you will execute in that page
> after loading the instructions. How should they know that?

Hm, clairvoyance? 8-)
Yes, get it!

> Nevertheless this is OK for short jobs, but if you are loading from
> a slow server or are loading large images and/or apply a time
> consuming javascript then you have to add some "waiting time",
> usually up to one second is long enough.

Yes, I am already using your tricks, thanks again, but speed is
important for my project, since I will need to load up to 20-30 
(maybe more later) pages and extract hte data in a specific TABLE 
from the sourcecode.

> There is only one "full" remedy I can see: An own JavaScript handler.
> 
> One way to know exactly when you are done is to use an "async"
> function in onload so that you can "await" that certain jobs are done
> and then send a callback via a javascriptHandler to LC.

That requires access to the html-file, right? 
Or can I "inject" something like that on-the-fly?
If yes, how should it look like?

Sorry, still a complete newbie in JavaScript...


Best

Klaus
--
Klaus Major
https://www.major-k.de
klaus at major-k.de





More information about the use-livecode mailing list