Currently there is no way to know the service worker has loaded. Currently `webView:didFinishNavigation:` fires early and the service worker loads after this. A new delegate or a completion handler on _loadServiceWorker: would be great. The completion handler should likely pass an `NSError`, or `bool` for success or failure reporting.
<rdar://problem/84274364>
Created attachment 441618 [details] Patch
Created attachment 441624 [details] Patch
Comment on attachment 441624 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=441624&action=review > Source/WebKit/UIProcess/WebPageProxy.cpp:4812 > + m_serviceWorkerLaunchCompletionHandler(false); I think you need this in the destructor too.
(In reply to Alex Christensen from comment #4) > Comment on attachment 441624 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=441624&action=review > > > Source/WebKit/UIProcess/WebPageProxy.cpp:4812 > > + m_serviceWorkerLaunchCompletionHandler(false); > > I think you need this in the destructor too. Good point, will fix.
Created attachment 441631 [details] Patch
Committed r284406 (243179@main): <https://commits.webkit.org/243179@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 441631 [details].