win.on('close') question #836
Unanswered
mikeblackstock
asked this question in
Q&A
Replies: 1 comment 9 replies
-
You can assign a callback to the window options that interrupts the destruction: proc.createWindow({
ondestroy: () => {
return false; // This will cancel destruction that occurs when close is called
},
}) |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey there. I'd like the window close icon - the red X - in the
title bar to minimize the window rather than actually close it.
I'm trying something like this:
win.on('close', () => win.minimize());
but the window still closes. Any ideas how I can do it?
Beta Was this translation helpful? Give feedback.
All reactions