Class CoreWebView2ExecuteScriptResult
The result for ExecuteScriptWithResultAsync(string).
public class CoreWebView2ExecuteScriptResult
- Inheritance
-
CoreWebView2ExecuteScriptResult
- Inherited Members
Properties
Exception
If Succeeded is false, you can use this property to get the unhandled exception thrown by script execution
public CoreWebView2ScriptException Exception { get; }
Property Value
ResultAsJson
A function that has no explicit return value returns undefined. If the script that was run throws an unhandled exception, then the result is also null.
public string ResultAsJson { get; }
Property Value
Succeeded
This property is true if ExecuteScriptWithResultAsync(string) successfully executed script with no unhandled exceptions and the result is available in the ResultAsJson property.
public bool Succeeded { get; }
Property Value
Methods
TryGetResultAsString(out string, out int)
If Succeeded is true and the result of script execution is a string, this method provides the value of the string result, and we will get the false var value when the js result is not string type.
public void TryGetResultAsString(out string stringResult, out int value)