Skip to content

nmoschkin/MAUIWebViewExample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MAUIWebViewExample

MAUI Custom Handlers For Hybrid Web View

This is a sample MAUI project that implements a custom Hybrid WebView component with JavaScript -> Native interoperability for Android, iOS, and Windows.

This is an extremely minimal project! Any additional enhancements you would like, for example, a more complete restoration of the original WebView's functionality is totally up to you.

Regarding Windows

According to various articles I read, the current WinUI3 iteration of WebView2 for MAUI is not yet allowing us to invoke AddHostObjectToScript. They plan this for a future release.

But, then I remembered it was Windows, so I created a work-around that most certainly emulates the same behavior and achieves the same result, with a somewhat unorthodox solution: by using an HttpListener.

EvaluateJavaScriptAsync

Because people kept asking for it, I went ahead and implemented this in all three platforms, as well.

About

MAUI Custom Renderer For Hybrid Web View

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages