Add a destructor#23
Conversation
…he timed out page.
|
@HTMLGuyLLC Any thoughts on this? |
|
Sorry, been tied up with lots of projects. I like the idea of adding a destructor, but I'm concerned about the namespaced mousemove event. How does it get triggered? You didn't add any other code related to mousemove in the plugin, so I assume it's something you have in your project. |
|
It gets triggered the same as any event using the string before the " |
|
Love it. Thanks for the reference. I will merge your pull request shortly. |
|
I changed the method name to destroy() and minimized the JS. Please pull the latest version and test for me if you get a chance. Thank you for your contribution! I gave you credit on the version. |
|
I changed the name of that method 4 or 5 times before creating the pull request. I'm fine with you calling it |
|
Works like a charm! Thanks! |
|
I just realized that 3.1.0 didn't get released to https://www.npmjs.com/package/jtimeout. Can we get that updated? |
|
Done, sorry about that. |
I'm not sure how you feel about this... Our implementation allows the users to close the timeout notification (
#jTimedoutAlert) and remain on the page after the server has terminated their session. In order to achieve this, I had to namespace themousemoveevent so it could be removed if they closed the alert. this is done in our code by customizing the jAlert with'closeBtn': trueand providing anonClosefunction. Without this destructor, moving the mouse re-creates countdowns and it tries to keep tracking and updating a session that has terminated.Do you feel there are other elements that should be destroyed by such a method?
If you don't like the destructor, can I at least get the namespaced
mousemoveevent?