This is a fork of the Ionic WKWebView cordova plugin, removing the internal webserver and serving the files directly from the local filesystem in order to ensure proper sandboxing.
LocalStorage
The localStorage and IndexedDB of the ionic-webview will not be accessible after the switch to this plugin. If you use @ionic/storage and the sqlite driver, then you will not be affected by this.
WebWorkers
WebWorkers cannot be loaded from the filesystem directly. As a workaround, they have to be inlined and loaded as a string/blob. So instead of this:
worker.js
self.onmessage = function (event) {
// worker code
}
const worker = new Worker('./assets/workers/worker.js')
You will have to do this:
worker.js
const workerJS = `
self.onmessage = function (event) {
// worker code
}
`
export default workerJS
import workerJS from '../../assets/workers/worker'
const blobURL = window.URL.createObjectURL(new Blob([workerJS]))
const entropyCalculatorWorker = new Worker(blobURL)
Others
There might be other issues that we are not aware of. Please test your app thoroughly after switching to this plugin and report any errors here.