(no title)
benshumaker0 | 1 year ago
I've never of a web app that lets you pull panels to a second screen. Sounds neat though. Is there a good reference?
benshumaker0 | 1 year ago
I've never of a web app that lets you pull panels to a second screen. Sounds neat though. Is there a good reference?
jitl|1 year ago
This issue with this strategy is usually over reliance on 3rd party code that assumes that globalThis.window is the only window, and event handlers don’t end up working or something.
If you are using good libraries that really understand the DOM (React itself handles this well) or you write things yourself, it’s a bit of bother to add “target window” as a parameter to various functions that were previously using the global but quite doable.
I built an electron app that has one “root” window that is hidden that I use to spawn child windows without needing to load an entire new web page & instance of the JS bundle into each window. I used Tldraw and had to do some patch-package to fix global window assumptions in a few places.
Here’s my code: https://github.com/justjake/tlshot/blob/main/src/renderer/ed...