A common interface to a JavaScript engine. Every JavaScript engine is
obtained from a
IJavaScriptEnginePool
and will be returned to the
pool when it is disposed. Therefore, you must dispose the engine when
you are done with it.
- Namespace
- Statiq
.Common - Interfaces
-
- IDisposable
- Implementing Types
graph BT
Type-.->Interface0["IDisposable"]
Type["IJavaScriptEngine"]
class Type type-node
Implementing0["TestJsEngine"]-.->Type
click Implementing0 "/api/Statiq.Testing.JavaScript/TestJsEngine"
Syntax
public interface IJavaScriptEngine : IDisposable
Properties
Name | Property Type | Summary |
---|---|---|
Name | string |
Gets the name of JavaScript engine.
|
Version | string |
Gets the version of original JavaScript engine.
|
Methods
Name | Return Value | Summary |
---|---|---|
CallFunction |
object |
Calls a JavaScript function.
|
CallFunction |
T |
Calls a JavaScript function.
|
EmbedHostObject |
void |
Embeds a host object to script code.
|
EmbedHostType |
void |
Embeds a host type to script code.
|
Evaluate |
object |
Evaluates an expression.
|
Evaluate |
T |
Evaluates an expression.
|
Execute |
void |
Executes JavaScript code.
|
ExecuteFile |
void |
Executes code from JavaScript file.
|
ExecuteResource |
void |
Executes code from embedded JavaScript resource.
|
ExecuteResource |
void |
Executes code from embedded JavaScript resource.
|
GetVariableValue |
object |
Gets the value of variable.
|
GetVariableValue |
T |
Gets the value of variable.
|
HasVariable |
bool |
Сhecks for the existence of a variable.
|
RemoveVariable |
void |
Removes a variable.
|
SetVariableValue |
void |
Sets the value of variable.
|