Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to handle navigation erros with “xamarin + Xam.Plugin.Webview” cross-platform #115

Open
Flying-Light opened this issue Jan 16, 2019 · 1 comment

Comments

@Flying-Light
Copy link

I am using xamarin + Xam.Plugin.Webview to build a cross-platform application "https://github.com/SKLn-Rad/Xam.Plugin.Webview"

Everything is fine, but I want to handle the navigation errors:
1- why I get errors for linked css and js file in the web page?
2- How to read only errors which come from the page itself like, 404 and others.
3- I want to hide the webview from the form and show friendly page if I cannot load the content of the page.
4- Is there a way to keep navigation events rais only for the source link, not for the linked css or js files?

Finally, I tried to tack all the errors, e.g. "FormswebView_OnNavigationError". but sometimes I get 404 error, while the page is correctly working fine because this 404 error was just for a linked file "css, js, images" in the pages only which not prevent the page from working. I want to handle, "no connection", "cannot load", "server busy", and all kind of errors that will prevent the user to see the content. All solutions should be work in cross-platform, please.

In brief, how to know if the page finally displayed or not?

Thanks in advance

@Flying-Light
Copy link
Author

Sorry, I am not a native english speaker.
I want just to know if my webpage is loaded or not.
I do not want the use to see any error pages.
I cannot count on "OnNavigationError" Event it is not usefull. It raised for some css, js errors, even if page is correctly loaded.
some times it raised 404 "not found" error for linked css, js files, and the webpage is loaded
I want to override all webview error pages.
I hope if I make it more clear
Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant