зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 829e818cd4c3 (bug 1263304
)
This commit is contained in:
Родитель
be66b650bb
Коммит
c2fda627e6
|
@ -25,18 +25,13 @@ http://creativecommons.org/licenses/publicdomain/
|
|||
<script class="testbody" type="text/javascript">
|
||||
|
||||
function debug(str) {
|
||||
info("DEBUG>" + str + "\n");
|
||||
// console.log(str + "\n");
|
||||
}
|
||||
|
||||
function start() {
|
||||
return navigator.serviceWorker.register("worker.js" + "?" + (Math.random()), {scope: "."})
|
||||
.then((swr) => {
|
||||
registration = swr;
|
||||
debug('registration');
|
||||
var worker = registration.installing;
|
||||
registration.installing.addEventListener('statechange', function(evt) {
|
||||
debug("Worker is in state: " + worker.state);
|
||||
});
|
||||
return waitForActive(registration);
|
||||
});
|
||||
}
|
||||
|
@ -50,7 +45,6 @@ http://creativecommons.org/licenses/publicdomain/
|
|||
}
|
||||
|
||||
function hasPermission(swr) {
|
||||
debug('hasPermission');
|
||||
var p = new Promise(function(res, rej) {
|
||||
swr.pushManager.permissionState().then(
|
||||
function(state) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче