Any thoughts on that?
One question I would have is where are you loading the the l page from? Is it coming from the same URL or root URL? The reason I ask is that some aspects of browsers will not load JS that does not come from a safe considered source. Can you load the page/contents in a plain browser? Some browsers and I think Safari is one by default that is cautious in how it handles JS code. I don’t know the command personally but there may be some variables of flags passed to the function request to allow the JS to be loaded and executed.
Also FYI the server gives me back response 200 code for the scripts, so they are not "Not Found" cases here. Just the scripts don't work at all.
Looking at the commands you’re using it looks like those on meant to load files, from various sources. Without understanding why your. Not just having the web view load the page via URL vs passing the fetched files I am not sure how to help you more. Hopefully somebody else here can help more.
Something tells me that your design tactic may not be the best. But I don’t know what would be better outside of loading the content within the web view.
Just to elaborate on a bit more. The steps that I follow are the following:
I download a file containing web resources
I save it to my file system etc under Documents or Caches
I load a url to my web view from an html file and several dependencies start to load automatically by the server, css, js, fonts
I have registered a route collection in vapor so when I capture the specific paths I do map these resources as server Responses. For examples, in index.html there is a main.js, a main.css and a pic.png so I return as Response in vapor return req.fileio.stream('Caches/DownloadedFile/main.js) and req.fileio.stream('Caches/DownloadedFile/main.js) and req.fileio.stream('Caches/DownloadedFile/pin.png).
I hope it is more crystal clear right now.