vue dispatch action at tab close

Solutions on MaxInterview for vue dispatch action at tab close by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "vue dispatch action at tab close"
Cher
19 Nov 2016
1let that = this
2window.addEventListener("beforeunload", function(event) {
3    event.preventDefault();
4    // problem line 
5    that.$store.dispatch('CURR_TERMINAL_ACTION', that.id)
6})
7