瀏覽代碼

Simplifying callbal example

Sébastien Ros 11 年之前
父節點
當前提交
c58d5dcca6
共有 1 個文件被更改,包括 1 次插入3 次删除
  1. 1 3
      README.md

+ 1 - 3
README.md

@@ -49,10 +49,8 @@ You can also directly pass POCOs or anonymous objects and use them from JavaScri
 
 If you need to pass a JavaScript callback to the CLR, then it will be converted to a `Delegate`. You can also use it as a parameter of a CLR method from JavaScript.
 
-    var engine = new Engine()
+    var function = new Engine()
         .Execute("function add(a, b) { return this + a + b; }");
-
-    var function = engine
         .GetGlobalValue("add")
         .ToObject() as Delegate;