Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

Commented Issue: Calling a function with a parameter in JScriptEngine [56]

$
0
0
I initialize my engine with the following lines:

```
Dim engine As JScriptEngine
engine = New JScriptEngine(WindowsScriptEngineFlags.EnableDebugging)
engine.AddHostType("Console", GetType(Console))

```

I add the following script to the engine:

```
function Test(param) {
Console.WriteLine("Called Test with param: " + param);
}
```

When I call

```
engine.Script.Test(20)
```

It prints: "Called Test with param: undefined"

Does JScriptEngine not support calling internal functions with parameters?
Comments: We cannot reproduce this issue in ClearScript 5.4, and there has been no response from ahmetuzun in 10 days. Marking as resolved.

Viewing all articles
Browse latest Browse all 2297

Latest Images

Trending Articles





Latest Images