blob: 4de8f317b2c6df6b9e3aae6111acfbe42b9fba23 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
<!DOCTYPE html>
<script>
function done(exists) {
parent.postMessage(exists, '*');
}
function fail() {
parent.postMessage("FAIL", '*');
}
navigator.serviceWorker.getRegistration(".").then(function(reg) {
if (reg) {
reg.unregister().then(done.bind(undefined, true), fail);
} else {
dump("getRegistration() returned undefined registration\n");
done(false);
}
}, function(e) {
dump("getRegistration() failed\n");
fail();
});
</script>
|