blob: f421118d799d932a51395bf03bed115610ab5ecf (
plain)
1
2
3
4
5
6
7
8
9
|
this.onpush = function (event) {
var request = event.data.json();
if (request.type == "exception") {
throw new Error("Uncaught exception");
}
if (request.type == "rejection") {
event.waitUntil(Promise.reject(new Error("Unhandled rejection")));
}
};
|