private JsCreateContext ( |
||
runtime | ||
debugSite | IDebugApplication32 | |
newContext | ||
Résultat | JsErrorCode |
/// <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 IeJsContext CreateContext() { IeJsContext reference; IeJsErrorHelpers.ThrowIfError(Utils.Is64BitProcess() ? IeNativeMethods.JsCreateContext(this, (IDebugApplication64)null, out reference) : IeNativeMethods.JsCreateContext(this, (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 IeJsContext CreateContext(IDebugApplication32 debugApplication) { IeJsContext reference; if (Utils.Is64BitProcess()) { throw new InvalidOperationException(); } IeJsErrorHelpers.ThrowIfError(IeNativeMethods.JsCreateContext(this, debugApplication, out reference)); return(reference); }