function checkEnabled() {
ok(navigator.serviceWorker, "navigator.serviceWorker should exist when ServiceWorkers are enabled.");
ok(typeof navigator.serviceWorker.register === "function", "navigator.serviceWorker.register() should be a function.");
ok(typeof navigator.serviceWorker.getRegistration === "function", "navigator.serviceWorker.getAll() should be a function.");
ok(typeof navigator.serviceWorker.getRegistrations === "function", "navigator.serviceWorker.getAll() should be a function.");
ok(navigator.serviceWorker.ready instanceof Promise, "navigator.serviceWorker.ready should be a Promise.");
ok(navigator.serviceWorker.controller === null, "There should be no controller worker for an uncontrolled document.");
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.