How to get subscription for sending notification in amp without opening new tab?

Viewed 97

So, amp provide a component for push notification. They have mentioned that this component require some additional integration in which i have to upload two HTML files (provided) on my site as well as an amp-web-push compatible service worker JavaScript file. These three files form the configuration described below :

<amp-web-push
  helper-iframe-url="https://example.com/helper-iframe.html"
  permission-dialog-url="https://example.com/permission-dialog.html"
  service-worker-url="https://example.com/service-worker.js"
></amp-web-push>

But persmission-dialog-url always result in opening a new tab for asking permission for notification. can we do it by not opening extra tab.

also please help me out in helper-iframe-url? they have explained it as "This page enables communication between the AMP page and the service worker which subscribes and unsubscribes the user. This page also helps determines the notification permission status." But I dont know how it will do the same.

0 Answers
Related