browserDocumentLoadComplete fired twice Mobile
Sannyasin Brahmanathaswami
brahma at hindu.org
Tue Jan 29 12:35:17 EST 2019
browserDocumentLoadComplete
is not in the dictionary. It's in described in API doc for the browser widget. Maybe that is intentional
At any rate, for some reason if you have two browses widgets on the same card, but you have this in the script of only 1 browser widget
widget "loader"
widget "Body" # has the script:
On browserDocumentLoadComplete pURL
# so do stuff
End browserDocumentLoadComplete
On desktop, it fires once, as expected.
But using Network Tracer (a God Sent Plugin!) on mobile it fires twice and I can see that it is fired once when "loader" in invoked and once again when "body" in loader.
If as if the widget "loader" has the script also, but it does not.
Can anyone confirm this? if so I will report a bug. But it a nuisance really because I'm getting double entries in the "Journal"
Now if there is no way to determine from
browserDocumentLoadComplete
which browser is calling the handler, I would provide a conditional (pseudo code)
if the browser widget is "Loader" then
# do nothing
Else
the browser widget is "body"
setAddJournal pURL
end if
maybe a second parameter is needed
browserDocumentLoadComplete pURL pTarget
More information about the use-livecode
mailing list