In the manifest.json file I have set the following:
"web_accessible_resources": [
"template.html"
]
Then used the following command to get the url
browser.runtime.getURL('template.html')
Which results in the following as expected:
safari-web-extension://40C1D308-F374-4C87-98C8-D9E9A4AD7945/template.html
However, when trying to fetch the file from within the script I get :
Failed to load resource: The requested URL was not found on this server.
And when pasting it as a url in safari I get :
Safari cannot open the page because the address is invalid.
The template.html file exists in the same folder as the manifest.json file. I've even tried placing it in a folder called html, then using the following with wildcard, and that doesn't work either.
"web_accessible_resources": [
"html/*.html"
]