Exemple #1
0
        private void initJSRuntime()
        {
            runtime = ChakraRuntime.Create();
#if DEBUG
            context = runtime.CreateContext(true);
#else
            context = runtime.CreateContext(false);
#endif
            JSRequireLoader.EnableRequire(context, WorkPath);
            var s = Properties.Resources.boot;
            context.RunScript(Properties.Resources.boot);
        }
Exemple #2
0
 protected override void SetupContext()
 {
     JSRequireLoader.EnableRequire(context, "Script\\Require");
     Log("Promise enabled");
 }