Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript

<amp-web-push
        id="amp-web-push"
        layout="nodisplay"
        helper-iframe-url="/notix-amp-frame.htm"
        permission-dialog-url="/notix-amp-permission-dialog.htm"
        service-worker-url="/sw.enot.js?appId=yourAppId"
></amp-web-push>


<amp-web-push-widget visibility="unsubscribed"
                     layout="fixed"
                     width="500"
                     height="70">
    <button on="tap:amp-web-push.subscribe">
        Subscribe to Notifications
    </button>
</amp-web-push-widget>

<amp-web-push-widget visibility="subscribed"
                     layout="fixed"
                     width="500"
                     height="180">
    <button on="tap:amp-web-push.unsubscribe">
        Unsubscribe from Notifications
    </button>
</amp-web-push-widget>
Source by docs.notix.co #
 
PREVIOUS NEXT
Tagged: #javascript
ADD COMMENT
Topic
Name
9+8 =