IWebViewExecuteJavascriptWithResult Method (String, String)Awesomium.NET 1.7.6Awesomium.NET
Executes some JavaScript synchronously on the page, and returns a result.

Namespace: Awesomium.Core
Assembly: Awesomium.Core (in Awesomium.Core.dll) Version:

JSValue ExecuteJavascriptWithResult(
	string script,
	string frameXPath


Type: SystemString
The string of JavaScript to execute.
Type: SystemString
The xpath of the frame to execute within; leave this blank to execute in the main frame.

Return Value

Type: JSValue
Returns the result (if any). Any JSObject returned from this method will be a remote proxy for an object contained within the view's process. If this call fails, the returned JSValue will have an Undefined type. (see IsUndefined). You can check GetLastError for more information about the failure.

InvalidOperationException The member is called on an invalid view. (See: IsLive)
NotSupportedException The operation is not supported on a Developer Tools Inspector view (see: IsJavascriptEnabled).
NotSupportedException Javascript calls are not supported when Javascript is disabled (see: IsJavascriptEnabled).
InvalidOperationException The member is called from inside a synchronous Javascript Execution Context
InvalidOperationException Attempted to execute Javascript on the page, before the DOM is ready. Wait for the DocumentReady event before executing your Javascript.
See Also