- From: majaybabu <notifications@github.com>
- Date: Wed, 04 Apr 2018 22:10:19 +0000 (UTC)
- To: w3c/payment-handler <payment-handler@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 4 April 2018 22:10:48 UTC
@romandev
Just tried using navigator.serviceWorker.addEventListener() instead of window.addEventListener() on the popup. That didn't help - It is still not invoking the message eventhandler.
<script>
if ('serviceWorker' in navigator) {
console.log('its there')
}
window.addEventListener('load', function(evt) {
console.log('received:----');
navigator.serviceWorker.addEventListener("message", function (event) {
console.log('message received: ' + event.data);
document.write(event.data);
});
});
</script>
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/payment-handler/issues/280#issuecomment-378761165
Received on Wednesday, 4 April 2018 22:10:48 UTC