Implement delegate method for WebView load failures

This can happen if the WebView itself terminates the load, for example if window.close() is called from JavaScript.
This commit is contained in:
Allan Odgaard
2014-03-28 18:34:20 +07:00
parent c9400e036d
commit 5a8967e88e

View File

@@ -70,6 +70,18 @@ extern NSString* const kCommandRunnerURLScheme; // from HTMLOutput.h
[super webView:sender didFinishLoadForFrame:frame];
}
- (void)webView:(WebView*)sender didFailProvisionalLoadWithError:(NSError*)error forFrame:(WebFrame*)frame
{
self.runningCommand = NO;
self.autoScrollHelper = nil;
}
- (void)webView:(WebView*)sender didFailLoadWithError:(NSError*)error forFrame:(WebFrame*)frame
{
self.runningCommand = NO;
self.autoScrollHelper = nil;
}
// =========================================
// = WebPolicyDelegate : Intercept txmt:// =
// =========================================