зеркало из https://github.com/mozilla/gecko-dev.git
23 строки
415 B
JavaScript
23 строки
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");
|
|
});
|
|
});
|
|
};
|