forked from github/cordova-android
CB-7974 Cancel timeout timer if view is destroyed
This commit is contained in:
parent
032ea8a8d3
commit
e78db000c6
@ -783,6 +783,9 @@ public class CordovaWebView extends WebView {
|
|||||||
|
|
||||||
public void handleDestroy()
|
public void handleDestroy()
|
||||||
{
|
{
|
||||||
|
// Cancel pending timeout timer.
|
||||||
|
loadUrlTimeout++;
|
||||||
|
|
||||||
// Send destroy event to JavaScript
|
// Send destroy event to JavaScript
|
||||||
this.loadUrl("javascript:try{cordova.require('cordova/channel').onDestroy.fire();}catch(e){console.log('exception firing destroy event from native');};");
|
this.loadUrl("javascript:try{cordova.require('cordova/channel').onDestroy.fire();}catch(e){console.log('exception firing destroy event from native');};");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user