mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 00:05:36 +00:00
7f516ea381
--HG-- extra : commitid : 8uF5cA3R489 extra : rebase_source : 32dcfc2a2816dabecb7a102d7b44b8f2d2c89160
27 lines
472 B
HTML
27 lines
472 B
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
|
|
<script>
|
|
|
|
|
|
function waitOnPushMessage(pushSubscription)
|
|
{
|
|
var p = new Promise(function(res, rej) {
|
|
navigator.serviceWorker.onmessage = function(e) {
|
|
if (e.data.type == "finished") {
|
|
(e.data.okay == "yes" ? res : rej)(e.data);
|
|
}
|
|
};
|
|
});
|
|
return p;
|
|
}
|
|
|
|
|
|
</script>
|
|
</head>
|
|
<body>
|
|
|
|
</body>
|
|
</html>
|