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

6 строки
128 B
JavaScript

onmessage = function(e) {
self.clients.matchAll().then(function(clients) {
e.source.postMessage(clients.length);
});
};