Slbox
Slbox

Reputation: 13108

Electron: Is it Possible to Update Existing browserWindow Options - Avoid Needing To Create a New Window

I'd like to add a feature to toggle alwaysOnTop, but it seems like the only way to do this is to destroy my existing window and create a new one. Is there any way to update the options of the existing window?

Upvotes: 0

Views: 80

Answers (1)

subwaymatch
subwaymatch

Reputation: 1040

You can use browserWindow.setAlwaysOnTop(boolean flag).

Refer to https://electron.atom.io/docs/api/browser-window/#winsetalwaysontopflag-level-relativelevel.

Upvotes: 1

Related Questions