title: WKWebView does not work on evaluateJavaScript() form submit
body: <p>In our app we are dynamically creating a form with input fields and relying on evaluateJavaScript() function to submit the form and load the url in the decision handler. This approach has been working fine and seems to have been broken in iOS 14 (tested beta 3, 4, 5). Prior to iOS 14 the code below resulted in decidePolicyFor delegate function getting called but it doesn't get called in iOS 14.</p>
  <p><strong>The only solution I have found so far is to add the ‘form’ to the dom before calling form.submit() (commented line in javascriptForExecution() function)</strong></p>
  <p>Any other suggestions/ideas?</p>
  <pre><code>override func viewDidLoad() {
      super.viewDidLoad()
      webView.evaluateJavaScript(javascriptForExecution()) { (result, error) in
          if error != nil {
              print(&quot;Javascript execuption failed: \(error.debugDescription)&quot;)
          }
      }
  }
  
  private func javascriptForExecution() -&gt; String {
      return &quot;&quot;&quot;
      var form = document.createElement('form');
      form.method = 'POST';
      form.action = 'https://www.example.com/';
      var input = document.createElement('input');
      input.type = 'hidden';
      input.name = 'Name';
      input.value = 'NameValue';
      form.appendChild(input);
      //document.body.appendChild(form)
      form.submit();
      &quot;&quot;&quot;
  }
  
  // WKNavigationDelegate
  public func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, decisionHandler: @escaping (WKNavigationActionPolicy) -&gt; Void) {
      if navigationAction.request.url?.absoluteString == &quot;https://www.example.com/&quot; {
          if let url = URL(string: &quot;https://www.apple.com&quot;) {
              webView.load(URLRequest(url: url))
          }
          decisionHandler(.cancel)
          return
      }
      decisionHandler(.allow)
  }
  </code></pre>