jQuery-Desktop icon indicating copy to clipboard operation
jQuery-Desktop copied to clipboard

Capturing the window open/close event for use in Javascript programs

Open Techokami opened this issue 7 years ago • 1 comments

Hello,

I am knee deep in working over this amazing thing into a new personal website, and one thing I want to know is how to capture the event of a window getting opened or closed. This is for use with something like, a game in Javascript that exists within a window, so the state can be initialized upon the window being opened, and clearing the state and stopping the game when the window is closed.

Thank you!

Techokami avatar Feb 06 '18 22:02 Techokami

The open/close event is captured here…

https://github.com/nathansmith/jQuery-Desktop/blob/master/assets/js/jquery.desktop.js#L256-L260

nathansmith avatar Mar 05 '18 20:03 nathansmith