public string RunJavaScript(string script)
{
Debug.Assert(!InvokeRequired);
// Review JohnT: does this require integration with the NavigationIsolator?
if (_browser.Window != null) // BL-2313 two Alt-F4s in a row while changing a folder name can do this
{
using (var context = new AutoJSContext(_browser.Window))
{
string result;
context.EvaluateScript(script, (nsISupports)_browser.Document.DomObject, out result);
return result;
}
}
return null;
}