How to get push message events like click,close,show with firebase cloud messaging
<p>Trying to implement web push notifications using FCM.</p>

<p>I am able to receive push message with payload on browser using firebase cloud messaging library.</p>

<p>Below is a javascript code snippet.</p>

<pre><code>&lt;script src="https://www.gstatic.com/firebasejs/3.5.1/firebase.js"&gt;  &lt;/script&gt;
firebase.initializeApp(config);
const messaging = firebase.messaging();
messaging.onMessage(function(payload){
    console.log('onMessage',payload);
});
</code></pre>

<p>How to capture events like click,close,show,etc ?</p>