Re: [w3c/payment-handler] window.open not working from paymentrequest eventlistener (#280)

@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