Hi,
Is it possible in Meteor to execute code when the user closes his browser window, or when he puts in the background?
Thanks
Hi,
Is it possible in Meteor to execute code when the user closes his browser window, or when he puts in the background?
Thanks
Take a look at the wonderful mizzao:user-status package. From the server API section of the docs:
The UserStatus.events object is an EventEmitter on which you can listen for connections logging in and out. Logging out includes closing the browser; reopening the browser will trigger a new login event.
Thanks, will look into it.