Method | Description | |
---|---|---|
AddRef ( ) : uint |
Adds a reference to a script context Calling AddRef ensures that the context will not be freed until Release is called. |
|
GetAndClearException ( ) : |
Returns a exception that caused the runtime of the current context to be in the exception state and resets the exception state for that runtime If the runtime of the current context is not in an exception state, this API will throw Requires an active script context. |
|
Idle ( ) : uint |
Tells the runtime to do any idle processing it need to do If idle processing has been enabled for the current runtime, calling Requires an active script context. |
|
ParseScript ( string script ) : |
Parses a script and returns a Requires an active script context. |
|
ParseScript ( string script, JsSourceContext sourceContext, string sourceName ) : |
Parses a script and returns a Requires an active script context. |
|
Release ( ) : uint |
Releases a reference to a script context Removes a reference to a context that was created by AddRef. |
|
RunScript ( string script ) : |
Executes a script Requires an active script context |
|
RunScript ( string script, JsSourceContext sourceContext, string sourceName ) : |
Executes a script Requires an active script context. |
|
SerializeScript ( string script, byte buffer ) : ulong |
Serializes a parsed script to a buffer than can be reused SerializeScript parses a script and then stores the parsed form of the script in a runtime-independent format. The serialized script then can be deserialized in any runtime without requiring the script to be re-parsed. Requires an active script context. |
|
SetException ( |
Sets a runtime of the current context to an exception state If the runtime of the current context is already in an exception state, this API will throw Requires an active script context. |
Method | Description | |
---|---|---|
JsContext ( |
Initializes a new instance of the JsContext struct
|
public static GetAndClearException ( ) : |
||
return |
public static ParseScript ( string script ) : |
||
script | string | The script to parse |
return |
public static ParseScript ( string script, JsSourceContext sourceContext, string sourceName ) : |
||
script | string | The script to parse |
sourceContext | JsSourceContext | The cookie identifying the script that can be used /// by script contexts that have debugging enabled |
sourceName | string | The location the script came from |
return |
public static RunScript ( string script ) : |
||
script | string | The script to run |
return |
public static RunScript ( string script, JsSourceContext sourceContext, string sourceName ) : |
||
script | string | The script to run |
sourceContext | JsSourceContext | The cookie identifying the script that can be used /// by script contexts that have debugging enabled |
sourceName | string | The location the script came from |
return |
public static SerializeScript ( string script, byte buffer ) : ulong | ||
script | string | The script to serialize |
buffer | byte | The buffer to put the serialized script into. Can be null |
return | ulong |
public static SetException ( |
||
exception | The JavaScript exception to set for the runtime of the current context | |
return | void |