Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-7991 WKWebView integration
  3. CB-7051

[WKWebView][iOS 8] Support evaluateJavaScript:completionHandler:

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • cordova-ios
    • None
    • iOS 8 beta 2

    Description

      https://git-wip-us.apache.org/repos/asf/cordova-ios.git branch "wkwebview"

      http://trac.webkit.org/changeset/169765

      Change summary:
      Add -[WKWebView evaluateJavaScript:completionHandler:]

      Right now it's using the private method _runJavaScriptInFrame, in a category, and returns an empty string in the completionHandler.

      Hopefully this method is added in iOS 8 beta 3.

      Filed:
      rdar://problem/17423463


      Summary:
      There is no API function to do this. Yes, you can use WKUserScripts to write at before the document is loaded and after, but not at arbitrary times. You need an equivalent to [UIWebView stringByEvaluationJavascriptFromString:(NSString*)]

      Steps to Reproduce:
      1. Use WKWebView.
      2. Try to evaluate JavaScript at an arbitrary time

      Expected Results:
      Ability evaluate JavaScript at an arbitrary time

      Actual Results:
      Not able to evaluate JavaScript at an arbitrary time

      Version:
      iOS 8 beta 2

      Configuration:
      iOS Simulator, iPad 2

      Attachments

        Issue Links

          Activity

            People

              shazron Shazron Abdullah
              shazron Shazron Abdullah
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: