зеркало из https://github.com/mozilla/gecko-dev.git
20 строки
561 B
HTML
20 строки
561 B
HTML
<!DOCTYPE html>
|
|
<script>
|
|
if (navigator.serviceWorker.controller) {
|
|
window.parent.postMessage({status: "controlled"}, "*");
|
|
} else {
|
|
window.parent.postMessage({status: "uncontrolled"}, "*");
|
|
}
|
|
|
|
navigator.serviceWorker.getRegistration(".").then(function(registration) {
|
|
if(!registration) {
|
|
return;
|
|
}
|
|
registration.unregister().then(() => {
|
|
window.parent.postMessage({status: "unregistrationdone"}, "*");
|
|
});
|
|
}).catch(function(e) {
|
|
window.parent.postMessage({status: "getregistrationfailed"}, "*");
|
|
});
|
|
</script>
|