I'm trying to load the Chromecast background website into a c# WebBrowser but am getting:
I assumed it was happening because the webbrowser is using IE7 by default(?) which might not play well with the JS in the website. I tried to updated the registery FEATURE_BROWSER_EMULATION
to 9000 hoping force the webbrowser
to use IE9 framework. But I still get the same errors.
Is the webbrowser to basic for this task or is there a way around this problem?
EDIT:
So when I print the webbrowser.version
I get: Version: 11.0.9600.16518. Which is the current version of IE I have. If I open IE11 and navigate to the url its works great. Not sure why the webbroswer
is having an issue.
I tried to inject a JSON Parser into the webpage with this code:
HtmlDocument doc = webBrowser1.Document;
Console.WriteLine(doc);
HtmlElement head = doc.GetElementsByTagName("head")[0];
HtmlElement s = doc.CreateElement("script");
s.SetAttribute("type", "text/javascript");
s.SetAttribute("src", "http://192.168.1.23:10000/JSON-js-master/json2.js");
head.AppendChild(s);
I tried with local and external ips referencing the host file. Didn't seem the make a difference.