[Webkit-unassigned] [Bug 176625] New: decidePolic
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Sep 8 12:46:25 PDT 2017
https://bugs.webkit.org/show_bug.cgi?id=176625
Bug ID: 176625
Summary: decidePolic
Product: WebKit
Version: WebKit Local Build
Hardware: iPhone / iPad
OS: iOS 11
Status: NEW
Severity: Normal
Priority: P2
Component: WebKit2
Assignee: webkit-unassigned at lists.webkit.org
Reporter: raghavendra.l at gmail.com
Created attachment 320290
--> https://bugs.webkit.org/attachment.cgi?id=320290&action=review
Sample WkWebView app for simulating issue in decidePolicyForNavigationAction
Hi,
We are having issue with decidePolicyForNavigationAction callback function. We found that evaluateJavaScript method fails to invoke its completionHandler callback when called within decidePolicyForNavigationAction delegate and before its decisionHandler was called.
While this is working in current iOS10 but fails on iOS11 beta. This code flow is as per Appleās documentation - https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455641-webview?language=objc
decisionHandler never gets called if it is in Async block in decidePolicyForNavigationAction delegate callback.
Below is the code snippet which works in iOS10 & not on iOS11.
- (void)webView:(WKWebView *)webView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler{
NSLog(@"decidePolicyForNavigatiAction");
[_webView evaluateJavaScript:@"document.getElementById('demo').innerHTML = \"Change Content of Paragraph\"" completionHandler:^(id result, NSError * _Nullable error) {
NSLog(@"The Result is:%@",result);
decisionHandler(WKNavigationActionPolicyCancel); //Never gets called
}];
}
Thanks
Raghavendra
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170908/8e8498a1/attachment.html>
More information about the webkit-unassigned
mailing list