mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 17:55:50 +00:00
0a8ff0ad85
# ignore-this-changeset Differential Revision: https://phabricator.services.mozilla.com/D35951 --HG-- extra : source : 62f3501af4bc1c0bd1ee1977a28aee04706a6663
23 lines
415 B
JavaScript
23 lines
415 B
JavaScript
onmessage = function(e) {
|
|
clients.matchAll().then(function(c) {
|
|
if (c.length === 0) {
|
|
// We cannot proceed.
|
|
return;
|
|
}
|
|
|
|
registration
|
|
.unregister()
|
|
.then(
|
|
function() {
|
|
c[0].postMessage("DONE");
|
|
},
|
|
function() {
|
|
c[0].postMessage("ERROR");
|
|
}
|
|
)
|
|
.then(function() {
|
|
c[0].postMessage("FINISH");
|
|
});
|
|
});
|
|
};
|