Skip to content

Commit 1b9ded2

Browse files
authored
Update ExecuteScriptWithResult.md
1 parent e88dbbc commit 1b9ded2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

specs/ExecuteScriptWithResult.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Background
2-
Our end developers have pointed out gaps in the existing CoreWebView2.ExecuteScript method, and it is necessary
2+
Our end developers have pointed out gaps in the existing [CoreWebView2.ExecuteScript](https://docs.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2?view=webview2-1.0.1150.38#executescript) method, and it is necessary
33
to provide a new method to let our end developers get more information in a more convenient manner.
44
The new ExecuteScriptWithResult method will provide exception information if the executed script
55
failed, and provides a new method to try to get the script execution result as a string rather than as JSON
@@ -188,6 +188,7 @@ class ExecuteScriptWithResultDemo
188188
```
189189

190190
# API Details
191+
The spec file for `ExecuteScript` is [WebView2Feedback/specs/ExecuteScript.md](https://github.com/MicrosoftEdge/WebView2Feedback/blob/ca99cf43fde3f536a4d3981d53b8345edb0c9a62/specs/ExecuteScript.md).
191192
## Win32 C++
192193
```c++
193194
/// This interface represents a JavaScript exception.
@@ -292,6 +293,7 @@ interface ICoreWebView2_10 : ICoreWebView2_9 {
292293
```
293294

294295
## .NET and WinRT
296+
The documentation for the old interface [CoreWebView2.ExecuteScriptAsync(String) Method](https://docs.microsoft.com/en-us/dotnet/api/microsoft.web.webview2.core.corewebview2.executescriptasync?view=webview2-dotnet-1.0.1150.38#microsoft-web-webview2-core-corewebview2-executescriptasync(system-string)) is here.
295297
```c#
296298
namespace Microsoft.Web.WebView2.Core
297299
{
@@ -311,6 +313,8 @@ namespace Microsoft.Web.WebView2.Core
311313
{
312314
Boolean Succeeded { get; };
313315

316+
// The return value of this interface is the same as `ExecuteScript`.
317+
// You can refer to the demo and documentation of `ExecuteScript`.
314318
String ResultAsJson { get; };
315319

316320
CoreWebView2ExecuteScriptException Exception { get; };

0 commit comments

Comments
 (0)