Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

HybridWebView.InjectJavascript problem with dispatchEvent

$
0
0

Hi
I have a problem with HybridWebView.InjectJavascript.
It makes functions and do everything except dispatchEvent:

hybridWebView.InjectJavaScript("function fff(){" +
                                 "l=document.getElementById('slideproducts');" +
                                 "e=document.createEvent('HTMLEvents');" +
                                 "e.initEvent('click',true,true);" +
                                 "l.dispatchEvent(e);"+
                         "}");

I tested javascript line by line and i got this on last line:
A first chance exception of type 'System.SystemException' occurred in Microsoft.Phone.Interop.ni.dll
in output.

Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>