cordova-plugin-wkwebview-engine
cordova-plugin-wkwebview-engine copied to clipboard
window.open won't work
I'm not sure why but as soon as I install this plugin window.open(url, '_blank') and without _blank stops worknig.
I have this in my config.xml
<access origin="*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-navigation href="*" />
It works without the wkwebview plugin.
Related open issue on apache issue tracker.
Is this reproducible in a new, plain Cordova app? A minimal reproduction repository would really help to debug and later fix this issue. More information on how to create one: https://github.com/apache/cordova-contribute/blob/master/create-reproduction.md
Same issue. It runs in the background as I can see the events firing, but the window isn't visible. It worked fine without this plugin.
It appears window.open works if your app uses cordova-plugin-inappbrowser. However, as soon as that plugin is removed, window.open no longer has any effect. (I've recently removed cordova-plugin-inappbrowser from my app since it still uses the deprecated UIWebView.)
i used npm i @zestia/cordova-plugin-wkwebview-engine-windowopen and it worked fine
@janpio I was able to solve my issue as well using the @zestia/cordova-plugin-wkwebview-engine-windowopen
Is this really a cordova issue or cordova-plugin-wkwebview-engine doesn't support window.open?
My project was quite old and was using InAppBrowser previously. The window.open was working at that time. Now with apple's guidelines to depracate UIWebView we upgraded to cordova-plugin-wkwebview-engine and window.open stopped working.
We are archiving this repository following Apache Cordova's Deprecation Policy. We will not continue to work on this repository. Therefore all issues and pull requests are being closed. Thanks for your contribution.