private IJsScriptExecutor CreateExecutor(IWindowEx window) { switch (_jsEngine) { case JsEngines.Jint: return(JintFactory.Create(new ScriptExecutionContext(window))); case JsEngines.Jurassic: return(JurassicFactory.Create(new ScriptExecutionContext(window))); default: throw new Exception("Invalid engine specified: " + _jsEngine); } }
public void DefineDefaultTypes() { var eng = JintFactory.Create(new ScriptExecutionContext(null)); Assert.AreEqual("function", eng.Evaluate("typeof Int8Array")); }