コード例 #1
0
        public void Evaluate(String source, ScriptOptions options)
        {
            var context = new DomNodeInstance(_engine, options.Context ?? new AnalysisWindow(options.Document));
            var env     = LexicalEnvironment.NewObjectEnvironment(_engine, context, _engine.ExecutionContext.LexicalEnvironment, true);

            _engine.EnterExecutionContext(env, _variable, context);
            _engine.Execute(source);
            _engine.LeaveExecutionContext();
        }
コード例 #2
0
 public DomFunctionInstance(DomNodeInstance host, MethodInfo method)
     : base(host.Engine, GetParameters(method), null, false)
 {
     _host   = host;
     _method = method;
 }