зеркало из https://github.com/mozilla/gecko-dev.git
15 строки
410 B
HTML
15 строки
410 B
HTML
<!DOCTYPE html>
|
|
<script>
|
|
function ok(v, msg) {
|
|
window.parent.postMessage({status: "ok", result: !!v, message: msg}, "*");
|
|
}
|
|
|
|
function done(reg) {
|
|
ok(reg.active, "The active worker should be available.");
|
|
window.parent.postMessage({status: "registrationdone"}, "*");
|
|
}
|
|
|
|
navigator.serviceWorker.ready.then(done);
|
|
navigator.serviceWorker.register("https_test.js", {scope: "."});
|
|
</script>
|