gecko-dev/dom/serviceworkers/test/lazy_worker.js

9 строки
167 B
JavaScript

onactivate = function(event) {
var promise = new Promise(function(res) {
setTimeout(function() {
res();
}, 500);
});
event.waitUntil(promise);
}