I am trying to get the HTML of a webview and save it. I have, essentially, the following in my app:
Ti.API.info("save()"); Ti.API.info(1); var body = view.evalJS("setupSave()"); Ti.API.info(2); if (!body || body == "" || body == "undefined") { Ti.API.info("save(): no body"); } Ti.API.info(3);and, in my webview-loaded JS:
function setupSave() { Ti.API.info("setupSave()"); return document.body.innerHTML; }On iOS this works fine, and the output is:
[INFO] save() [INFO] 1 [INFO] setupSave() [INFO] 2 [INFO] 3On Android, however, I get:
save() 1 2 save(): no body setupSave()Like that: no "3", and "setupSave()" comes after the "no body" message.
What could explain this out-of-order Ti.API.info() logging, to give me some idea of where to start looking?