kopia lustrzana https://gitlab.com/rysiekpl/libresilient
comments and minor whitespace fixes
rodzic
a90a9793a8
commit
a8707f758b
|
@ -29,10 +29,11 @@ self.LibResilientConfig.plugins = [{
|
|||
'https://gateway.pinata.cloud/ipns/<CIDv0-or-CIDv1>/', // Germany
|
||||
'https://<CIDv1>.ipns.bluelight.link/' // Singapore
|
||||
|
||||
]},{
|
||||
name: 'gun-ipfs',
|
||||
gunPubkey: '<your-gun-pubkey>'
|
||||
}]
|
||||
]
|
||||
},{
|
||||
name: 'gun-ipfs',
|
||||
gunPubkey: '<your-gun-pubkey>'
|
||||
}]
|
||||
}]
|
||||
|
||||
// we need to explicitly list components we want to see debug messages from
|
||||
|
|
|
@ -498,7 +498,15 @@ if ('serviceWorker' in navigator) {
|
|||
var scriptFolder = scriptPath.substr(0, scriptPath.lastIndexOf( '/' )+1 )
|
||||
var serviceWorkerPath = scriptFolder + 'service-worker.js'
|
||||
self.log('browser-side', 'Service Worker script at: ' + serviceWorkerPath)
|
||||
// TODO: is there a way to provide config params for the Service Worker here?
|
||||
// TODO: it would be good if the config.js script could reside outside of the libresilient directory
|
||||
// TODO: https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/register
|
||||
navigator.serviceWorker.register(serviceWorkerPath, {
|
||||
// TODO: what is the scope relative to? is it the HTML file that included it, or this script?
|
||||
// TODO: "It is relative to the base URL of the application." ¯\_(ツ)_/¯
|
||||
// TODO: "There is frequent confusion surrounding the meaning and use of scope.
|
||||
// TODO: Since a service worker can't have a scope broader than its own location,
|
||||
// TODO: only use the scope option when you need a scope that is narrower than the default."
|
||||
scope: './'
|
||||
}).then(function(reg) {
|
||||
// Success.
|
||||
|
|
Ładowanie…
Reference in New Issue