@@ -243,12 +243,9 @@ interface ICoreWebView2ExecuteScriptResult : IUnknown {
243243 /// 2. E_POINTER: When the ` jsonResult ` is nullptr.
244244 [ propget] HRESULT ResultAsJson([ out, retval] LPWSTR* jsonResult);
245245
246- /// If Succeeded is true and the result of script execution is a string, this method provides the value of the string result
247- /// The return value description is as follows
248- /// 1. S_OK: Execution succeeds.
249- /// 2. E_ILLEGAL_METHOD_CALL: When the script result is not a string type.
250- /// 3. E_POINTER: When the ` stringResult ` is nullptr.
251- HRESULT TryGetResultAsString([ out, retval] LPWSTR* stringResult);
246+ /// If Succeeded is true and the result of script execution is a string, this method provides the value of the string result,
247+ /// and we will get the ` FALSE ` var value when the js result is not string type.
248+ HRESULT TryGetResultAsString([ out] LPWSTR* stringResult, [ out, retval] BOOL* value);
252249
253250 /// If Succeeded is false, you can use this property to get the unhandled exception thrown by script execution
254251 /// Note that due to the compatibility of the WinRT/.NET interface,
@@ -312,7 +309,7 @@ namespace Microsoft.Web.WebView2.Core
312309
313310 CoreWebView2ExecuteScriptException Exception { get ; };
314311
315- String TryGetResultAsString ();
312+ Int32 TryGetResultAsString (out String stringResult );
316313 }
317314
318315 runtimeclass CoreWebView2ExecuteScriptException
0 commit comments