gecko-dev/dom/serviceworkers/test/register_https.html

15 строки
385 B
HTML

<!DOCTYPE html>
<script>
function ok(condition, message) {
parent.postMessage({type: "ok", status: condition, msg: message}, "*");
}
function done() {
parent.postMessage({type: "done"}, "*");
}
ok(location.protocol == "https:", "We should be loaded from HTTPS");
ok(!("serviceWorker" in navigator), "ServiceWorkerContainer not availalble in insecure context");
done();
</script>