browserDocumentLoadComplete working correctly?

hh hh at hyperhh.de
Wed Nov 20 16:13:40 EST 2019


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.
*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?

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.

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.





More information about the use-livecode mailing list