Can i handle back button within methods in vuejs 2 : <p>I need some help in vuejs 2. I want to detect back button pressed event. I did some research and found this,</p>

<pre><code>document.addEventListener("backbutton", yourCallBackFunction, false");
</code></pre>

<p>I think it is global event. I need something local, within a method. where i can use some logic.</p>

<pre><code>methods: {
    backButtonPressed() {
    }
}
</code></pre>

<p>Or can i bind the global one to local function? Can anyone help me with that? TIA</p>
