1
0
Fork 0
firefox/dom/push/test/frame.html
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

24 lines
557 B
HTML

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
<script>
function waitOnWorkerMessage(type) {
return new Promise(function(res, rej) {
function onMessage(e) {
if (e.data.type == type) {
navigator.serviceWorker.removeEventListener("message", onMessage);
(e.data.okay == "yes" ? res : rej)(e.data);
}
}
navigator.serviceWorker.addEventListener("message", onMessage);
});
}
</script>
</head>
<body>
</body>
</html>