Browse Source

Update README.md

Sébastien Ros 11 years ago
parent
commit
03a4224988
1 changed files with 7 additions and 7 deletions
  1. 7 7
      README.md

+ 7 - 7
README.md

@@ -12,16 +12,16 @@ Jint is a Javascript interpreter for .NET. Jint doesn't compile Javascript to .N
 
 
     script= @"
-      function square(x) { 
-        return x * x; 
+      function hello() { 
+        log("Hello World");
       };
-  
-    return square(number);
     ";
   
-    var result = new JintEngine()
-      .SetParameter("number", 3)
-      .Run(script));
+    var engine = new Engine(cfg => cfg
+        .WithDelegate("log", new Action<object>(Console.WriteLine))
+    );
+    
+    engine.Execute("hello()");
 
 
 You can also check the actual implemented test suite for more samples.