WKWebView

Swift

extension WKWebView
  • Synchronously evaluates the given javascript. If the result is a number it is retuned, otherwise the method returns nil. Might log an error, if there are issues with the script.

    Declaration

    Swift

    @discardableResult
    @objc(pspdf_numberByEvaluatingJavaScript:)
    func numberByEvaluating(javascript: String?) -> NSNumber?
  • Synchronously evaluates the given javascript. If the result is a strubg it is retuned, otherwise the method returns nil. Might log an error, if there are issues with the script.

    Declaration

    Swift

    @discardableResult
    @objc(pspdf_stringByEvaluatingJavaScript:)
    func stringByEvaluating(javascript: String?) -> String?