次の方法で共有


CoreWebView2ExecuteScriptResult Class

Definition

public class CoreWebView2ExecuteScriptResult
type CoreWebView2ExecuteScriptResult = class
Public Class CoreWebView2ExecuteScriptResult
Inheritance
CoreWebView2ExecuteScriptResult

Properties

Exception

If Succeeded is false, you can use this property to get the unhandled exception thrown by script execution

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.

Succeeded

This property is true if ExecuteScriptWithResultAsync(String) successfully executed script with no unhandled exceptions and the result is available in the ResultAsJson property.

Methods

TryGetResultAsString(String, Int32)

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.

Applies to