I use Gecko Browser in C#. The following code shows that jQuery is loaded.
GeckoWebBrowser GWB = new GeckoWebBrowser .....
bool JSExec;
string JSresult = "";
string JStext = @"alert(jQuery.fn.jquery);";
using (AutoJSContext JScontext = new AutoJSContext(GWB.Window.JSContext))
{
JSExec = JScontext.EvaluateScript(JStext, (nsISupports)GWB.Window.DomWindow, out JSresult);
}
Alert box display 1.4.4
Is it possible to load a newer version of jQuery? Eg 2.0.2 => https://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js
Edit to replay @John
Yes I'm using GeckoFx. To to include a library, in
GeckoBrowser_DocumentCompleted()
I do this :
bool JSExec;
string JSresult = "";
GeckoScriptElement scriptJQuery = GWB.Document.CreateElement("script") as GeckoScriptElement;
scriptJQuery.Type = "text/javascript";
scriptJQuery.Src = "https://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js";
GWB.Document.Head.AppendChild(scriptJQuery);
string JStext = @"alert(jQuery.fn.jquery);";
using (AutoJSContext JScontext = new AutoJSContext(GWB.Window.JSContext))
{
JSExec = JScontext.EvaluateScript(JStext, (nsISupports)GWB.Window.DomWindow, out JSresult);
}
Hélas ! Alert display 1.4.4 !