-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
Use case
In a webpage, that is running in webview_flutter, the following Javascript is executed window.open('https://google.com', '_top'). This works perfectly on Android, but iOS is ignoring it, because it requires WKPreferences bool javaScriptCanOpenWindowsAutomatically to be set to true. This is currently not possible, as this preference is not exposed via the WebView widget and not handled in the webview_flutter_wkwebview package.
Proposal
I want to add javaScriptCanOpenWindowsAutomatically as a widget parameter, which I'm able to do by reverse engineering the Dart and Objective-C code from the package. I also tested if simply setting this preference to true in FlutterWebView.m works, which does the trick. I'm just struggling to find out how exactly FlutterWebview.m is generated and how I can add the required handlers. Can someone point me in the right direction so I can provide the pull request?