gecko-dev/dom/serviceworkers/test/worker_unregister.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 строки
420 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");
});
});
};