store senders instead of buffering messages

This commit is contained in:
Rahul Sharma 2016-08-24 23:22:02 +05:30
parent 0996b38ade
commit 9dcb7348a2
17 changed files with 193 additions and 188 deletions

View file

@ -1,9 +1,11 @@
importScripts('dashboard_helper.js');
self.addEventListener('activate', function(e) {
status_from_dashboard();
console.log('Dashboard service worker active');
});
self.addEventListener('fetch', function(e) {
console.log("A fetch event detected by /dashboard service worker");
});
console.log("A fetch event detected by /dashboard service worker");
});
self.addEventListener('message', function(e) {
console.log(e.data.payload.msg + ' from '+ e.data.payload.worker_id);
})