[iPadOS14 beta4] WKWebView does not work on jquey submit method.

Hi, I uses iPad Air2, iPadOS 14.0 beta 4.
My app (ObjC) contains of WKWebView and loads the following html code with jquery (ver 1.11.1).

Code Block language html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript" src="js/jquery-1.11.1.min.js"></script>
<script>
function f(){
var html = '<form name="myapi" action="myapi" method="POST">' +
'</form>';
$(html).submit();
}
function callback_test(option){
$('#temp').remove();
$('#callback').append('<div id="temp">callback: ' + option + '<div>');
}
</script>
</head>
<body>
<input type='button' onclick='f()' value='jquerySubmit'></input><br />
<div><div id='callback'></div></div>
</body>
</html>

In iPadOS13, on click jquerySubmit button, my app calls objective-c method (webView:decidePolicyForNavigationAction:decisionHandler:) and executes javascript method (callback_test).
Then, it displays "callback: ok".

But, in iPadOS14, the following code does not work.

Code Block language objective-c
- (void) webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler
{
NSMutableURLRequest* req = navigationAction.request.mutableCopy;
if([navigationAction.request.HTTPMethod isEqualToString:@"POST"])
{
NSURL *url = [req URL];
NSString *method = [url lastPathComponent];
if ([url isFileURL]) {
if ([method isEqualToString:@"myapi"]) {
[self.myWKWebView evaluateJavaScript:@"callback_test('ok')" completionHandler:nil];
}
}
}
decisionHandler(WKNavigationActionPolicyAllow);
}


Could Apple fix this bug in iPadOS14 official release?
Hi! How’s the battery life on iPadOS 14 beta 4? On my iPhone, it was just fine. So I was just wondering how is it on an iPad?
I submited apple feedback assistant with the issue, too.
https://feedbackassistant.apple.com/
Accepted Answer
Apple replied this issue to me in apple feedback assistant.
It is a change for WebKit to follow the regulation of Html5 strictly in iPadOs14.

I think other ways for my app
[iPadOS14 beta4] WKWebView does not work on jquey submit method.
 
 
Q