I'm developing a WPF application with only a WebBrowser that launch a HTML page with JavasCript. I also have some C# methods.
I'm looking for a good way to launch my C# methods in JavaScript, with parameters and if possible callbacks.
For now, I have JavaScript methods that navigate to special URL like "myApp://mymethod?param1=value¶m2=value" and in the "Navigating" event of the webBrowser, I check the URL and call the method that I need with the parameters.
This solution works but the size of the URL is limited. How can I send heavier data ? (custom headers data, POST, cookies, local storage or anything else I don't know... :) )
I can't use window.external because in the end I will use Xamarin to do a cross-platforms app. WebBrowser will be for Windows, but IOS use UIWebView that dosen't support window.external ( stevesaxon.me/posts/2011/… ) so i need a solution that works everywhere and the custom URL has a size limit.
If somebody has a solution...