Table of Contents
- Getting Started
- EO.Pdf
- EO.Web
- EO.WebBrowser
- EO.Wpf
- Common Topics
- Reference
- .NET API Reference
- EO.Base
- EO.Base.UI
- EO.Extensions
- EO.Extensions
- Classes
- HtmlToPdfExtension Class
- PdfViewerExtensions Class
- WebViewExtensions Class
- EO.Pdf
- EO.Pdf.Acm
- EO.Pdf.Contents
- EO.Pdf.Drawing
- EO.Pdf.Mvc
- EO.Web
- EO.WebBrowser
- EO.WebBrowser.DOM
- EO.WebEngine
- EO.WinForm
- EO.Wpf
- EO.Wpf.Gauge
- EO.Wpf.Gauge.Shapes
- EO.Wpf.Primitives
- EO.Wpf.Themes.Aero
- EO.Wpf.Themes.Classic
- EO.Wpf.Themes.Luna
- EO.Wpf.Themes.Metro
- EO.Wpf.Themes.Royale
- JavaScript API Reference
- .NET API Reference
WebViewExtensions.EvalScriptAsync Method (WebView, String, String) |
Asynchronously Execute JavaScript code in a frame and returns the result value.

Type Parameters
- TResult
- The type of the result value.
Parameters
- webView
- The WebView object.
- script
- The JavaScript code to be executed.
- frameName
- The name of the frame in which the code to be executed. Pass null to execute the code in the main frame.
Return Value
-
A task that represents the asynchronous operation. The Value of its Result property contains the result value of the JavaScript code.

The following code demonstrates how to get the current document Url:
string s = await webView.EvalScriptAsync<string>("window.location.href");
