Can You Create A Persistent Floating Window in JavaScript?

52 Views Asked by At

I am trying to implement a persistent floating window in a NextJS 14 app. Basically this window should persist and stay on top, even if you navigate between browser windows. If you minimize your browser window, the floating window should stay on top. All the examples i saw on CodePen the floating window persist only inside the browser window, and not outside the window. Is it possible to develop a floating window that persists outside of the browser, like a persistent floating Picture-In-Picture feature? Is this possible with Electron.js?

1

There are 1 best solutions below

0
Jenna On

I was able to use Electron.js BrowserWindow's setAlwaysOnTop(true, 'floating') to create a persistent floating window that always stays on top. Closing this question now.