summaryrefslogtreecommitdiffstats
path: root/dom/indexedDB/test/service_worker.js
blob: eb8fd7f6637a123c9cfc4e8663acd95815dc8876 (plain)
1
2
3
4
5
6
7
8
9
10
onmessage = function(e) {
  self.clients.matchAll().then(function(res) {
    if (!res.length) {
      dump("Error: no clients are currently controlled.\n");
      return;
    }
    res[0].postMessage(indexedDB ? { available: true } :
                                   { available: false });
  });
};