ID:2589214
 
Applies to:Dream Seeker
Status: Open

Issue hasn't been assigned a status value.
I wonder if it's easy or possible to add to BYOND at all.

I have stumbled upon a situation, when I want to run custom javascript code when you press X and not destroy the window.

Instead, it would run the callback code, where you would set is-visible to 0 (or potentially something else), allowing stuff to continue run in the background. This way the browser no longer needs to refresh the page and redownload the assets if you want to reuse it, and it can be quite handy.

Of course it's possible to render your own close button and disable the titlebar, but I feel it's not the BYOND way of doing things.

Perhaps can-close=2 could be used, where 2 would prevent the default action, or override-close, custom-close, prevent-close, default-close. Minimize button could also make use of this.