In my app I have a WKWebView that executes some long running tasks (via javascript), but it seems that when the app is backgrounded the javascript being executed in the WKWebView just pauses/freezes. Bringing the app to foreground resumes the javascript execution.
How can I keep javascript code running even when my app is backgrounded?