WKWebView

class WKWebView : UIView
  • Evaluates a JavaScript expression inside of the web view’s JavaScript context.

    Note

    The completion handler always runs on the main thread.

    Declaration

    Swift

    public func evaluate<T>(expression: T, completionHandler: T.EvaluationCallback?) where T : JSExpression

    Parameters

    expression

    The expression to execute.

    completionHandler

    The code to execute with the execution result.