Beispiel #1
0
 internal static extern JavaScriptErrorCode JsRunScript(
     string script,
     JavaScriptSourceContext sourceContext,
     string sourceUrl,
     out JavaScriptValue result);
Beispiel #2
0
 internal static extern JavaScriptErrorCode JsRunSerializedScript(
     string script,
     byte[] buffer,
     JavaScriptSourceContext sourceContext,
     string sourceUrl,
     out JavaScriptValue result);
Beispiel #3
0
 /// <summary>
 /// Executes specified script.
 /// </summary>
 /// <param name="script">The script to run.</param>
 /// <param name="sourceContext">
 /// A cookie identifying the script that can be used by script contexts that have debugging enabled.
 /// </param>
 public static JavaScriptValue RunScript(string script, JavaScriptSourceContext sourceContext)
 {
     NativeMethods.JsRunScript(script, sourceContext, string.Empty, out JavaScriptValue result)
     .ThrowIfError();
     return(result);
 }