open-vault/ui/lib/service-worker-authenticated-download/service-worker-registration/index.js
Jordan Reimer 2bb7da0f27
Raft Snapshot Download Bug (#17769)
* 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
2022-11-02 13:23:09 -06:00

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();
});
});