2bb7da0f27
* moves service worker message event listener from addon to raft-storage-overview component * adds changelog entry * adds raft-storage-overview test for downloading snapshot via service worker
9 lines
322 B
JavaScript
9 lines
322 B
JavaScript
import { addSuccessHandler } from 'ember-service-worker/service-worker-registration';
|
|
|
|
addSuccessHandler(function (registration) {
|
|
// attempt to unregister the service worker on unload because we're not doing any sort of caching
|
|
window.addEventListener('unload', function () {
|
|
registration.unregister();
|
|
});
|
|
});
|