CDVWebViewUIDelegate handles a bunch of interactions with the UI and view controllers, and currently doesn't have a pointer to the CDVViewController that owns its associated WKWebView.
Feature Description
Provide an initializer for CDVWebViewUIDelegate that takes the CDVViewController and holds a weak reference to it.
Alternatives or Workarounds
We make some unsafe assumptions like the root view controller being safe to access, which has led to issues such as https://github.com/apache/cordova-ios/issues/1120. By having a reference to the CDVViewController we could ensure that any popups are correctly triggered by that view controller.
Feature Request
Motivation Behind Feature
CDVWebViewUIDelegate
handles a bunch of interactions with the UI and view controllers, and currently doesn't have a pointer to theCDVViewController
that owns its associatedWKWebView
.Feature Description
Provide an initializer for
CDVWebViewUIDelegate
that takes theCDVViewController
and holds a weak reference to it.Alternatives or Workarounds
We make some unsafe assumptions like the root view controller being safe to access, which has led to issues such as https://github.com/apache/cordova-ios/issues/1120. By having a reference to the
CDVViewController
we could ensure that any popups are correctly triggered by that view controller.