Skip to content

Commit

Permalink
Fix JS function invoke sample (#1855)
Browse files Browse the repository at this point in the history
  • Loading branch information
DHclly authored May 9, 2024
1 parent 9839339 commit 4a2dd00
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,9 @@ Assert.AreEqual("Minnie", p.Name);

You can invoke JavaScript function reference
```c#
var add = new Engine()
var result = new Engine()
.Execute("function add(a, b) { return a + b; }")
.GetValue("add");

add.Invoke(1, 2); // -> 3
.Invoke("add",1, 2); // -> 3
```
or directly by name
```c#
Expand Down

0 comments on commit 4a2dd00

Please sign in to comment.