Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

webView timeout?

when a webview loads a remote url, is it possible to check connection problems, e.g. set a timeout or monitor online status etc. what's best practice?
thanks, uno

— asked March 31st 2010 by u no
  • android
  • connection
  • webview

1 Answer

  • Hello,
    I think you can use webview.addEventListener('error', function(e) { /* your code */ });.

    And you can use the load event on the same way.

    Of course you can use setTimeout as well, which you can clear if load or error event occurs.

    — answered March 31st 2010 by Adam Wallner
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.