#include <VXIjsi.h>
This provides functionality for creating ECMAScript execution contexts, manipulating ECMAScript scopes, manipulating variables within those scopes, and evaluating ECMAScript expressions/scripts.
There is one ECMAScript interface per thread/line.
Public Attributes | |
VXIint32(* | GetVersion )(void) |
Get the VXI interface version implemented. | |
const VXIchar *(* | GetImplementationName )(void) |
Get the name of the implementation. | |
VXIjsiResult(* | CreateContext )(struct VXIjsiInterface *pThis, VXIjsiContext **context) |
Create and initialize a new script context. | |
VXIjsiResult(* | DestroyContext )(struct VXIjsiInterface *pThis, VXIjsiContext **context) |
Destroy a script context, clean up storage if required. | |
VXIjsiResult(* | CreateVarExpr )(struct VXIjsiInterface *pThis, VXIjsiContext *context, const VXIchar *name, const VXIchar *expr) |
Create a script variable relative to the current scope, initialized to an expression. | |
VXIjsiResult(* | CreateVarValue )(struct VXIjsiInterface *pThis, VXIjsiContext *context, const VXIchar *name, const VXIValue *value) |
Create a script variable relative to the current scope, initialized to a VXIValue based value. | |
VXIjsiResult(* | SetVarExpr )(struct VXIjsiInterface *pThis, VXIjsiContext *context, const VXIchar *name, const VXIchar *expr) |
Set a script variable to an expression relative to the current scope. | |
VXIjsiResult(* | SetVarDOM )(struct VXIjsiInterface *pThis, VXIjsiContext *context, const VXIchar *name, VXIPtr *doc) |
Set a script variable to a DOMDocument relative to the current scope. | |
VXIjsiResult(* | SetReadOnly )(struct VXIjsiInterface *pThis, VXIjsiContext *context, const VXIchar *name) |
set a script variable read-only to the current scope | |
VXIjsiResult(* | SetVarValue )(struct VXIjsiInterface *pThis, VXIjsiContext *context, const VXIchar *name, const VXIValue *value) |
Set a script variable to a value relative to the current scope. | |
VXIjsiResult(* | GetVar )(struct VXIjsiInterface *pThis, const VXIjsiContext *context, const VXIchar *name, VXIValue **value) |
Get the value of a variable. | |
VXIjsiResult(* | CheckVar )(struct VXIjsiInterface *pThis, const VXIjsiContext *context, const VXIchar *name) |
Check whether a variable is defined (not ECMAScript Undefined). | |
VXIjsiResult(* | Eval )(struct VXIjsiInterface *pThis, VXIjsiContext *context, const VXIchar *expr, VXIValue **result) |
Execute a script, optionally returning any execution result. | |
VXIjsiResult(* | PushScope )(struct VXIjsiInterface *pThis, VXIjsiContext *context, const VXIchar *name, const VXIjsiScopeAttr attr) |
Push a new context onto the scope chain (add a nested scope). | |
VXIjsiResult(* | PopScope )(struct VXIjsiInterface *pThis, VXIjsiContext *context) |
Pop a context from the scope chain (remove a nested scope). | |
VXIjsiResult(* | ClearScopes )(struct VXIjsiInterface *pThis, VXIjsiContext *context) |
Reset the scope chain to the global scope (pop all nested scopes). | |
const VXIMap *(* | GetLastError )(struct VXIjsiInterface *pThis, VXIjsiContext *context) |
Returns a VXIMap containing info on the last error. |
|
Check whether a variable is defined (not ECMAScript Undefined). NOTE: A variable with a ECMAScript Null value is considered defined
|
|
Reset the scope chain to the global scope (pop all nested scopes).
|
|
Create and initialize a new script context. This creates a new context. Currently one context is created per thread, but the implementation must support the ability to have multiple contexts per thread.
|
|
Create a script variable relative to the current scope, initialized to an expression. NOTE: When there is an expression, the expression is evaluated, then the value of the evaluated expression (the final sub-expression) assigned. Thus an expression of "1; 2;" actually assigns 2 to the variable.
|
|
Create a script variable relative to the current scope, initialized to a VXIValue based value.
|
|
Destroy a script context, clean up storage if required.
|
|
Execute a script, optionally returning any execution result.
|
|
Get the name of the implementation.
|
|
Returns a VXIMap containing info on the last error.
The returned map is only valid if a previous call resulted in an error. Additionally, the map may be destroyed when the the next call happens, so shoul not be retained.
Keys:
|
|
Get the value of a variable.
|
|
Get the VXI interface version implemented.
|
|
Pop a context from the scope chain (remove a nested scope).
|
|
Push a new context onto the scope chain (add a nested scope).
|
|
set a script variable read-only to the current scope
|
|
Set a script variable to a DOMDocument relative to the current scope. NOTE: Implementors must be aware of the exact contents of the VXIPtr passed by the interpreter. i.e., If the interpreter uses a Xerces DOMDocument, so must the implementation of this interface.
|
|
Set a script variable to an expression relative to the current scope. NOTE: The expression is evaluated, then the value of the evaluated expression (the final sub-expression) assigned. Thus an expression of "1; 2;" actually assigns 2 to the variable.
|
|
Set a script variable to a value relative to the current scope.
|