Bug 249778 - [iOS] Need API to detect the completion of iframe navigations
Summary: [iOS] Need API to detect the completion of iframe navigations
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit API (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-12-22 09:06 PST by Ali Juma
Modified: 2022-12-29 09:07 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ali Juma 2022-12-22 09:06:58 PST
Currently, WKNavigationDelegate only gets didCommit callbacks for main frame navigations. This means that WKWebView embedders have no way to detect the end of an iframe navigation.

However, iframe navigations can still add an item to WKBackForwardList. Since WKBackForwardList.currentItem is not KVO-compliant, there's no way for an embedder to get a callback when such a navigation item is added.

This means that embedders (like Chrome on iOS) that depend on performing computation to determine feature availability (like autofill) when the current item changes have breakage on iframe-only navigations that add a navigation item, since that navigation item is silently added (see crbug.com/1361722 for how this breaks autofill in Chrome).

It would be useful to either get the full set of navigation callbacks for iframe navigations (these already exist as SPI in WKNavigationDelegage), or to make WKBackForwardList.currentItem KVO-compliant.
Comment 1 Radar WebKit Bug Importer 2022-12-29 09:07:16 PST
<rdar://problem/103761549>