Closed jryans closed 8 years ago
There is still a bit of mystery, as I don't entirely follow why the unload handler is needed to make this work. Happy to revise if anyone has ideas!
Hmm, indeed, that's strange!
I just built this on Windows, and it doesn't seem to work for me there. :-(
What if app.quit calls Services.startup.quit(Services.startup.eAttemptQuit)
in a timeout to give the devtools window an extra turn of the event loop to close?
@mykmelez, does this version work on Windows? It works for me on Linux. It's a similar idea to the timeout, but uses dispatch
which is the idiom I've seen more often in Gecko for setTimeout(0, func)
type things.
@mykmelez, does this version work on Windows? It works for me on Linux.
It works for me on Windows!
It's a similar idea to the timeout, but uses dispatch which is the idiom I've seen more often in Gecko for setTimeout(0, func) type things.
Makes sense, let's use the common idiom!
This fixes #29 so that calls to
quit()
after the browser window closes correctly ends the application on Linux (and hopefully Windows as well).There is still a bit of mystery, as I don't entirely follow why the
unload
handler is needed to make this work. Happy to revise if anyone has ideas!r? @mykmelez