Move service worker into platform
This commit is contained in:
parent
87e67d8168
commit
e077d9ca5f
3 changed files with 8 additions and 5 deletions
|
@ -38,6 +38,12 @@ export default class WebPlatform extends VectorBasePlatform {
|
|||
return 'Web Platform'; // no translation required: only used for analytics
|
||||
}
|
||||
|
||||
registerServiceWorker(): void {
|
||||
if ('serviceWorker' in navigator) {
|
||||
navigator.serviceWorker.register('sw.js');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the platform supports displaying
|
||||
* notifications, otherwise false.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue