soixantecircuits / idle-vue

Vue component wrapper for idle-js
MIT License
125 stars 40 forks source link

Enhancement/adding ability to reset idle #41

Open caldwell619 opened 4 years ago

caldwell619 commented 4 years ago

Hello,

I was using your library with great success in the browser for the application I was working on. However, when it came to unit testing the app with the timer, I had some issues. There was no way for the timer to reset ( that I could find ). Sending events to the DOM that would reset in a normal browser had no effect in the JSDom environment.

Perhaps I could have been doing it wrong, but I found success by adding a method to the gloval plugin, extending idle-js capabilities already in place.

I added the method, and wrote some documentation for the readme. If this isn't welcomed, or wanted, please disregard. I really like the lib and hope this is useful.