UIWebView.EvaluateJavascript(String) Method

Definition

This method runs some Javascript and returns the the results of that scrip.

[Foundation.Export("stringByEvaluatingJavaScriptFromString:")]
public virtual string EvaluateJavascript (string script);
abstract member EvaluateJavascript : string -> string
override this.EvaluateJavascript : string -> string

Parameters

script
String

The Javascript to run.

Returns

Attributes

Remarks

Javascript execution may cause the main thread to block, rendering the web page unresponsive to the user. To mitigate this, the Javascript execution has a limit of 10 seconds. There is also a 10MB limit on the memory allocation for the script. If the script uses more than 10MB of then an exception will be raised.

Applies to