Docs claim that:
By adding hosts or host match patterns (or both) to the permissions section of the manifest file, the extension can request access to remote servers outside of its origin
My ≪manifest.json≫:
{"manifest_version":2,"name":"","version":"0","permissions":["http://example.org/"],"background":{"scripts":["asd"]}}
≪asd≫:
navigator.serviceWorker.register('sdf.js',{scope:'http://example.org/'}).then(x=>console.log('done', x))
≪sdf.js≫:
addEventListener('fetch', e=> e.respondWith(new Response('url: '+e.request.url,{headers:{'content-type':'text/html'/*, etc*/}})))
I loaded the code using ≪Load unpacked extension≫; It crashed without any error message:
Apparently the code "permissions":["http://example.org/"]
crashed the extension.
How to set permissions for Chrome Extension cross-origin serviceworker? Is there a required Chrome flag?