예제 #1
0
        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);
            }
        }
예제 #2
0
        public void DefineDefaultTypes()
        {
            var eng = JintFactory.Create(new ScriptExecutionContext(null));

            Assert.AreEqual("function", eng.Evaluate("typeof Int8Array"));
        }