private JsCreateContext ( |
||
runtime | ||
debugSite | IDebugApplication32 | |
newContext | ||
return | JavaScriptErrorCode |
/// <summary> /// Creates a script context for running scripts. /// </summary> /// <remarks> /// Each script context has its own global object that is isolated from all other script /// contexts. /// </remarks> /// <returns>The created script context.</returns> public JavaScriptContext CreateContext() { JavaScriptContext reference; Native.ThrowIfError( Environment.Is64BitProcess ? Native.JsCreateContext(this, (Native.IDebugApplication64)null, out reference) : Native.JsCreateContext(this, (Native.IDebugApplication32)null, out reference)); return(reference); }
/// <summary> /// Creates a debug script context for running scripts. /// </summary> /// <remarks> /// Each script context has its own global object that is isolated from all other script /// contexts. /// </remarks> /// <param name="debugApplication">The debug application to use.</param> /// <returns>The created script context.</returns> public JavaScriptContext CreateContext(Native.IDebugApplication32 debugApplication) { JavaScriptContext reference; if (Environment.Is64BitProcess) { throw new InvalidOperationException(); } Native.ThrowIfError(Native.JsCreateContext(this, debugApplication, out reference)); return(reference); }