You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2020/10/14 15:47:28 UTC

[GitHub] [cordova-plugin-inappbrowser] GMK82 opened a new issue #799: Decide policy on load error

GMK82 opened a new issue #799:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/799


   # Decide policy on load error
   
   ## Errors like WebKitErrorDomain (error code 102) and others interrupt the navigation process. In such cases navigation decisions should be made rather than rejected.
   <!-- Why should this feature be implemented? What problem does it solve? -->
   
   ### It would be useful to handle any errors in the loaderror method handler on the js side and make decisions about further navigation.
   
   ### My problem appears when beforeload was added and after several get requests followed by a post request in inappbrowser.
   
   The problem was solved by changing the following code:
   ```
   - (void)webView:(WKWebView*)theWebView didFailProvisionalNavigation:(null_unspecified WKNavigation *)navigation withError:(nonnull NSError *)error
   {
     if ([error.domain isEqualToString:@"WebKitErrorDomain"] && error.code == 102)
       return;
     else
       [self webView:theWebView failedNavigation:@"didFailProvisionalNavigation" withError:error];
   }
   ```
   
   <!-- 
   Describe your feature request in detail
   Please provide any code examples or screenshots of what this feature would look like
   Are there any drawbacks? Will this break anything for existing users? 
   -->
   
   
   <!-- 
   Describe alternatives or workarounds you are currently using 
   Are there ways to do this with existing functionality?
   -->
   
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org