You can use AutoJSContext to run javascript with geckofx.
Something like:
GeckoWebBrowser browser = ....;
using (AutoJSContext context = new AutoJSContext(browser.JSContext))
{
string result;
context.EvaluateScript("3 + 2;", out result)
}
See EvaluateScript unittests for more info and examples.
If you are using a super old version of geckofx you may need to get a later version - geckofx