mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-12-31 03:52:01 +08:00
542d9c91e9
Testing van be done at https://snappymail.eu/demo/
15 lines
285 B
JavaScript
15 lines
285 B
JavaScript
'use strict';
|
|
|
|
self.addEventListener('message', event => self.client = event.source);
|
|
|
|
const fn = event => {
|
|
self.client.postMessage(
|
|
JSON.stringify({
|
|
data: event.notification.data,
|
|
action: event.type
|
|
})
|
|
);
|
|
};
|
|
|
|
self.onnotificationclose = fn;
|
|
self.onnotificationclick = fn;
|