Summary
A common interface to a JavaScript engine. Every JavaScript engine is
obtained from a
Wyam.Common.JavaScript.IJavaScriptEnginePool
and will be returned to the
pool when it is disposed. Therefore, you must dispose the engine when
you are done with it.
- Assembly
- Wyam
.Common .dll - Namespace
- Wyam
.Common .JavaScript - Interfaces
-
- IDisposable
- Implementing Types
graph BT
Type-.->Interface0["IDisposable"]
Type["IJavaScriptEngine"]
class Type type-node
Implementing0["TestJsEngine"]-.->Type
click Implementing0 "/api/Wyam.Testing.JavaScript/TestJsEngine"
Syntax
public interface IJavaScriptEngine : IDisposable
Properties
Name | Value | Summary |
---|---|---|
Name | string |
Gets the name of JavaScript engine.
|
Supports |
bool |
Gets a value that indicates if the JavaScript engine supports garbage collection.
|
Supports |
bool |
Gets a value that indicates if the JavaScript engine supports script interruption.
|
Supports |
bool |
Gets a value that indicates if the JavaScript engine supports script pre-compilation.
|
Version | string |
Gets the version of original JavaScript engine.
|
Methods
Name | Value | Summary |
---|---|---|
CallFunction |
Object |
Calls a JavaScript function.
|
CallFunction |
T |
Calls a JavaScript function.
|
CollectGarbage |
void |
Performs a full garbage collection.
|
EmbedHostObject |
void |
Embeds a host object to script code.
|
EmbedHostType |
void |
Embeds a host type to script code.
|
Evaluate |
Object |
Evaluates an expression.
|
Evaluate |
Object |
Evaluates an expression.
|
Evaluate |
T |
Evaluates an expression.
|
Evaluate |
T |
Evaluates an expression.
|
Execute |
void |
Executes a pre-compiled script.
|
Execute |
void |
Executes JavaScript code.
|
Execute |
void |
Executes a 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 |
Checks for the existence of a variable.
|
Interrupt |
void |
Interrupts script execution and causes the JavaScript engine to throw an exception.
|
Precompile |
I |
Creates a pre-compiled script from JavaScript code.
|
Precompile |
I |
Creates a pre-compiled script from JavaScript code.
|
PrecompileFile |
I |
Creates a pre-compiled script from JavaScript file.
|
PrecompileResource |
I |
Creates a pre-compiled script from embedded JavaScript resource.
|
PrecompileResource |
I |
Creates a pre-compiled script from embedded JavaScript resource
|
RemoveVariable |
void |
Removes a variable.
|
SetVariableValue |
void |
Sets the value of variable.
|