title: Read local storage data using WKWebView
body: <p>I need to read value stored in the local storage of WKWbview. 
  I tried using the below code but getting nil. 
  I am able to write values in local storage but facing difficulty in reading values from it.</p>
  
  <pre><code>  let script = "localStorage.getItem('token')"
          wkWebView.evaluateJavaScript(script) { (token, error) in
              print("token = \(token)")
          }
  </code></pre>
  
  <p>WKWebView init code:</p>
  
  <pre><code>    // 1
      let accessToken = UserDefaults.standard.value(forKey: "token") as? String
      // 2
      let refreshToken = UserDefaults.standard.value(forKey: "RefreshToken") as? String
      // 3
      let configuration = WKWebViewConfiguration()
      // 4
      let contentController = WKUserContentController()
      let accessTokenScript = "javascript: localStorage.setItem('token', '\(accessToken!)')"
      // 5
      let userAccessTokenScript = WKUserScript(source: accessTokenScript, injectionTime: WKUserScriptInjectionTime.atDocumentStart, forMainFrameOnly: false)
  
      // 6
      contentController.addUserScript(userAccessTokenScript)
      configuration.userContentController = contentController
      self.wkWebView = WKWebView(frame: controller.view.bounds, configuration: configuration)
  </code></pre>