tenfourfox/dom/push/test/frame.html

27 lines
472 B
HTML
Raw Normal View History

2017-04-19 07:56:45 +00:00
<!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>